-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_headers
More file actions
35 lines (29 loc) · 1.5 KB
/
_headers
File metadata and controls
35 lines (29 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# CloudFlare Pages — HTTP Response Headers
# HTML pages — no cache (always fresh)
/*.html
Cache-Control: public, max-age=0, must-revalidate
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()
Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' fonts.googleapis.com cdnjs.cloudflare.com 'unsafe-inline'; font-src fonts.gstatic.com cdnjs.cloudflare.com; img-src 'self' data: https:; frame-src www.youtube.com; connect-src 'self';
# Root (index.html)
/
Cache-Control: public, max-age=0, must-revalidate
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()
Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' fonts.googleapis.com cdnjs.cloudflare.com 'unsafe-inline'; font-src fonts.gstatic.com cdnjs.cloudflare.com; img-src 'self' data: https:; frame-src www.youtube.com; connect-src 'self';
# CSS & JS — cache 1 hour (short TTL so updates propagate quickly)
/style.css
Cache-Control: public, max-age=3600
/script.js
Cache-Control: public, max-age=3600
# Static assets — cache 1 year (immutable)
/assets/*
Cache-Control: public, max-age=31536000, immutable
# Sitemap & robots — no cache
/sitemap.xml
Cache-Control: public, max-age=0, must-revalidate
Content-Type: application/xml; charset=utf-8