Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions _headers
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,25 @@
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=(), usb=()
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://static.cloudflareinsights.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; worker-src 'self' blob:; connect-src 'self' https://cloudflareinsights.com; font-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'

# The files index.html and the document pages request with a ?v= query.
# Their cache is busted by the number, which CI makes sure moves whenever
# the file does, so the copy a browser holds can be trusted for as long as
# a browser will keep it. Without this every asset carried Cloudflare's
# default of max-age=0, and a returning visitor revalidated the stylesheet
# and the generator on every load. Pages stay on the default: their names
# never change, so they have to be checked each time. The vendored GIF
# encoder is left out too; it carries no ?v=, so a swapped file under the
# same name would sit stale for a year.
/style.css
Cache-Control: public, max-age=31536000, immutable
/generator.js
Cache-Control: public, max-age=31536000, immutable
/guide.css
Cache-Control: public, max-age=31536000, immutable
/screenshot.png
Cache-Control: public, max-age=31536000, immutable
/screenshot.webp
Cache-Control: public, max-age=31536000, immutable
/screenshot-800.webp
Cache-Control: public, max-age=31536000, immutable
Loading