Skip to content

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

Closed
@sgrif

Description

@sgrif

🐛 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions