Skip to content

Commit 2d81a4e

Browse files
authored
Remove/replace references to the "crawler policy" (#8649)
We only have a data access policy at https://crates.io/data-access, which has replaced the `#crawler` part of `/policies`.
1 parent 9495670 commit 2d81a4e

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

app/templates/data-access.hbs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565
the
6666
<a href="https://doc.rust-lang.org/cargo/reference/registry-web-api.html">Cargo Web API</a>.
6767
Should you be unable to use one of the previous options, you are welcome to
68-
use the crates.io API provided you abide by the same limits as
69-
<LinkTo @route="policies">the crawling policy</LinkTo>. In summary:
68+
use the crates.io API provided you abide by the following limits:
7069
</p>
7170

7271
<ol>

src/middleware/block_traffic.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,9 @@ fn rejection_response_from(state: &AppState, headers: &HeaderMap) -> Response {
7272

7373
let body = format!(
7474
"We are unable to process your request at this time. \
75-
This usually means that you are in violation of our crawler \
76-
policy (https://{domain_name}/policies#crawlers). \
77-
Please open an issue at https://github.com/rust-lang/crates.io \
78-
or email [email protected] \
79-
and provide the request id {request_id}"
75+
This usually means that you are in violation of our API data access \
76+
policy (https://{domain_name}/data-access). \
77+
Please email [email protected] and provide the request id {request_id}"
8078
);
8179

8280
(StatusCode::FORBIDDEN, body).into_response()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
source: src/tests/server.rs
3-
expression: resp.into_json()
3+
expression: resp.json()
44
---
55
{
66
"errors": [
77
{
8-
"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 [email protected] and provide the request id abcd"
8+
"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 [email protected] and provide the request id abcd"
99
}
1010
]
1111
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
source: src/tests/server.rs
3-
expression: resp.into_json()
3+
expression: resp.json()
44
---
55
{
66
"errors": [
77
{
8-
"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 [email protected] and provide the request id "
8+
"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 [email protected] and provide the request id "
99
}
1010
]
1111
}

0 commit comments

Comments
 (0)