|
| 1 | +# Security and performance headers for Cloudflare Pages |
| 2 | +# https://developers.cloudflare.com/pages/platform/headers/ |
| 3 | + |
| 4 | +/* |
| 5 | + X-Content-Type-Options: nosniff |
| 6 | + X-Frame-Options: SAMEORIGIN |
| 7 | + X-XSS-Protection: 1; mode=block |
| 8 | + Referrer-Policy: strict-origin-when-cross-origin |
| 9 | + Permissions-Policy: camera=(), microphone=(), geolocation=() |
| 10 | + Content-Security-Policy: upgrade-insecure-requests |
| 11 | + |
| 12 | +# Cache static assets for 1 year |
| 13 | +/*.css |
| 14 | + Cache-Control: public, max-age=31536000, immutable |
| 15 | + |
| 16 | +/*.js |
| 17 | + Cache-Control: public, max-age=31536000, immutable |
| 18 | + |
| 19 | +/*.woff2 |
| 20 | + Cache-Control: public, max-age=31536000, immutable |
| 21 | + |
| 22 | +/*.woff |
| 23 | + Cache-Control: public, max-age=31536000, immutable |
| 24 | + |
| 25 | +/*.svg |
| 26 | + Cache-Control: public, max-age=31536000, immutable |
| 27 | + |
| 28 | +/*.png |
| 29 | + Cache-Control: public, max-age=31536000, immutable |
| 30 | + |
| 31 | +/*.jpg |
| 32 | + Cache-Control: public, max-age=31536000, immutable |
| 33 | + |
| 34 | +/*.webp |
| 35 | + Cache-Control: public, max-age=31536000, immutable |
| 36 | + |
| 37 | +/*.avif |
| 38 | + Cache-Control: public, max-age=31536000, immutable |
| 39 | + |
| 40 | +/*.ico |
| 41 | + Cache-Control: public, max-age=31536000, immutable |
| 42 | + |
| 43 | +# HTML pages - shorter cache |
| 44 | +/*.html |
| 45 | + Cache-Control: public, max-age=3600, must-revalidate |
| 46 | + |
| 47 | +/ |
| 48 | + Cache-Control: public, max-age=3600, must-revalidate |
0 commit comments