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

wasm-pack's version checking calls violate crates.io's crawler policy #651

Closed
sgrif opened this issue May 21, 2019 · 3 comments · Fixed by #658
Closed

wasm-pack's version checking calls violate crates.io's crawler policy #651

sgrif opened this issue May 21, 2019 · 3 comments · Fixed by #658
Assignees

Comments

@sgrif
Copy link

sgrif commented May 21, 2019

🐛 Bug description

When wasm-pack checks for a new version, it does not provide any user-agent header. crates.io recently rolled out a change which blocks all traffic which does this, as it violates our policies:

We also require all crawlers to provide a user-agent header that allows us to uniquely identify your bot. This allows us to more accurately monitor any impact your bot may have on our service. Providing a user agent that only identifies your HTTP client library (such as "request/0.9.1") increases the likelihood that we will block your traffic. It is recommended, but not required, to include contact information in your user agent. This allows us to contact you if we would like a change in your bot's behavior without having to block your traffic.

Bad: "User-Agent: reqwest/0.9.1"
Better: "User-Agent: my_bot"
Best: "User-Agent: my_bot (my_bot.com/info)" or "User-Agent: my_bot (help@my_bot.com)"

🤔 Expected Behavior

A user agent header, such as "wasm-pack version check" should be provided. Alternatively, this check should be done against the index, which contains all the information required to check if a more recent version is available without hitting the API

👟 Steps to reproduce

  • Publish a new version of wasm-pack
  • Run wasm-pack
  • See that no new version warning is emitted

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: n/a
rustc version: n/a

@fitzgen
Copy link
Member

fitzgen commented May 23, 2019

cc @drager @daubaris

@drager
Copy link
Member

drager commented May 25, 2019

Thanks for letting us know @sgrif! I will try to get a PR that adds that.

@drager
Copy link
Member

drager commented May 25, 2019

I made a PR that adds a user agent header that looks like this: User-Agent: wasm-pack/0.8.1 (https://github.com/rustwasm/wasm-pack).

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 a pull request may close this issue.

3 participants