diff --git a/app/templates/data-access.hbs b/app/templates/data-access.hbs index 99a208669c4..e996d51f1ee 100644 --- a/app/templates/data-access.hbs +++ b/app/templates/data-access.hbs @@ -65,8 +65,7 @@ the Cargo Web API. Should you be unable to use one of the previous options, you are welcome to - use the crates.io API provided you abide by the same limits as - the crawling policy. In summary: + use the crates.io API provided you abide by the following limits:

    diff --git a/src/middleware/block_traffic.rs b/src/middleware/block_traffic.rs index df450b1e9f0..2a80969a5a7 100644 --- a/src/middleware/block_traffic.rs +++ b/src/middleware/block_traffic.rs @@ -72,11 +72,9 @@ fn rejection_response_from(state: &AppState, headers: &HeaderMap) -> Response { let body = format!( "We are unable to process your request at this time. \ - This usually means that you are in violation of our crawler \ - policy (https://{domain_name}/policies#crawlers). \ - Please open an issue at https://github.com/rust-lang/crates.io \ - or email help@crates.io \ - and provide the request id {request_id}" + This usually means that you are in violation of our API data access \ + policy (https://{domain_name}/data-access). \ + Please email help@crates.io and provide the request id {request_id}" ); (StatusCode::FORBIDDEN, body).into_response() diff --git a/src/tests/snapshots/all__server__block_traffic_via_arbitrary_header_and_value.snap b/src/tests/snapshots/all__server__block_traffic_via_arbitrary_header_and_value.snap index afe18465044..65a24fbe14e 100644 --- a/src/tests/snapshots/all__server__block_traffic_via_arbitrary_header_and_value.snap +++ b/src/tests/snapshots/all__server__block_traffic_via_arbitrary_header_and_value.snap @@ -1,11 +1,11 @@ --- source: src/tests/server.rs -expression: resp.into_json() +expression: resp.json() --- { "errors": [ { - "detail": "We are unable to process your request at this time. This usually means that you are in violation of our crawler policy (https://crates.io/policies#crawlers). Please open an issue at https://github.com/rust-lang/crates.io or email help@crates.io and provide the request id abcd" + "detail": "We are unable to process your request at this time. This usually means that you are in violation of our API data access policy (https://crates.io/data-access). Please email help@crates.io and provide the request id abcd" } ] } diff --git a/src/tests/snapshots/all__server__block_traffic_via_ip.snap b/src/tests/snapshots/all__server__block_traffic_via_ip.snap index 3c5c58e6a05..d1c160e1a6d 100644 --- a/src/tests/snapshots/all__server__block_traffic_via_ip.snap +++ b/src/tests/snapshots/all__server__block_traffic_via_ip.snap @@ -1,11 +1,11 @@ --- source: src/tests/server.rs -expression: resp.into_json() +expression: resp.json() --- { "errors": [ { - "detail": "We are unable to process your request at this time. This usually means that you are in violation of our crawler policy (https://crates.io/policies#crawlers). Please open an issue at https://github.com/rust-lang/crates.io or email help@crates.io and provide the request id " + "detail": "We are unable to process your request at this time. This usually means that you are in violation of our API data access policy (https://crates.io/data-access). Please email help@crates.io and provide the request id " } ] }