rust-lang / rust-lang/simpleinfra
doc.rust-lang.org: add caching headers
Nobody has claimed this yet.
- Dominant language
- HCL
- Stars
- 178
- Forks
- 107
- Avg merge
- 15h 57m
- Merged PRs (30d)
- 38
Description
(moving from https://github.com/rust-lang/rust/issues/82286)
Steps to reproduce:
- Load any doc.rust-lang.org page, e.g. https://doc.rust-lang.org/std/str/index.html.
- Open Developer Console.
- Click the URL bar and hit enter to load the page again.
Expected result:
Most resources are cached and do not hit the network.
Actual result:
Many objects require a network fetch, but get a 304 Not Modified. These should be served with long caching headers.

Current headers:
$ curl -I https://doc.rust-lang.org/SourceCodePro-Regular.woff
HTTP/2 200
content-type: font/woff
content-length: 55472
last-modified: Thu, 11 Feb 2021 14:27:46 GMT
x-amz-version-id: R.xOjlR7eKEsQwzm9EIrHs9eeCIDeXYq
server: AmazonS3
date: Thu, 18 Feb 2021 13:27:31 GMT
etag: "957fa8c030f8116bea59c13df470e4e8"
x-cache: Hit from cloudfront
via: 1.1 4b84530d7a095b58fb7a1d20b7f0cbe0.cloudfront.net (CloudFront)
x-amz-cf-pop: HIO50-C2
x-amz-cf-id: QpMYsW6BVcTPpDmi8Pg9HiMz_1iSOIpdYv60MMzNqVoV707yqsv_Dw==
age: 63023
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the documented doc.rust-lang.org URL and the shown curl command. The payload names no repository files or entry points, so first locate the Amazon S3 or CloudFront configuration in simpleinfra, then verify that static resources receive long caching headers and reload without unnecessary 304 network requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100