Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ To publish the page, sign in once with `pnpm exec wrangler login`, using the Clo
pnpm site:deploy
```

The command builds the site and deploys it as a Cloudflare Worker with static assets (`wrangler.jsonc`). The Worker serves `github-file-hider.ribeiro.engineer` as a custom domain, so Cloudflare manages its DNS record and certificate. `site/public/_headers` sets the security and cache headers.
The command builds the site and deploys it as a Cloudflare Worker with static assets (`wrangler.jsonc`). The Worker serves `github-file-hider.ribeiro.engineer` as a custom domain, so Cloudflare manages its DNS record and certificate. `site/public/_headers` sets the security and cache headers. `Cache-Control: no-transform` on every response stops Cloudflare from changing the HTML, for example to inject its Web Analytics script, which the Content Security Policy would block.

## Manual test on the demo repository

Expand Down
4 changes: 3 additions & 1 deletion site/public/_headers
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=(), usb=()
Cross-Origin-Opener-Policy: same-origin
Cache-Control: public, max-age=0, must-revalidate, no-transform

/assets/*
Cache-Control: public, max-age=31536000, immutable
! Cache-Control
Cache-Control: public, max-age=31536000, immutable, no-transform
Loading