Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add User-Agent request header #16

Merged
merged 3 commits into from
Apr 26, 2018
Merged

feat: add User-Agent request header #16

merged 3 commits into from
Apr 26, 2018

Conversation

zeke
Copy link
Contributor

@zeke zeke commented Apr 25, 2018

This is a way to resolve #14 that doesn't include user-specific data.

Trying to adhere to official User-Agent syntax:

User-Agent: <product> / <product-version> <comment>

Common format for web browsers:

User-Agent: Mozilla/<version> (<system-information>) <platform> (<platform-details>) <extensions>

The string should look something like

update-electron-app/1.1.0 (darwin: x64)

@MarshallOfSound
Copy link
Member

This will only take affect on macOS, on windows their is no option to set headers

@juliangruber
Copy link
Contributor

juliangruber commented Apr 25, 2018

Actually, we should already know all this from their request url:

update.electron.org/electron/update-electron-app/darwin/1.1.0

Not sure if this is adding any info...

@zeke
Copy link
Contributor Author

zeke commented Apr 25, 2018

This will only take affect on macOS, on windows their is no option to set headers

So no Linux and no Windows. Dang.

we should already know all this from their request url:

True, URL does tell us the platform. But the version in the URL is the version of the app, whereas the version in the user agent is the version of the update-electron-app module that's making the request. I think it's also still useful because it will enable us to distinguish update-electron-app traffic from the rest.

@zeke
Copy link
Contributor Author

zeke commented Apr 25, 2018

@MarshallOfSound do you know if a query param will make it through intact?

@zeke zeke changed the title add User-Agent request header feat: add User-Agent request header Apr 26, 2018
@zeke
Copy link
Contributor Author

zeke commented Apr 26, 2018

This doesn't solve all our data collection goals, but it's a step. Gonna go ahead and ship it.

@zeke zeke merged commit caca85e into master Apr 26, 2018
@zeke zeke deleted the user-agent branch April 26, 2018 20:17
@zeke
Copy link
Contributor Author

zeke commented Apr 26, 2018

🎉 This PR is included in version 1.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add machine-id to query
3 participants