-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_headers
More file actions
39 lines (29 loc) · 1.52 KB
/
Copy path_headers
File metadata and controls
39 lines (29 loc) · 1.52 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
36
37
38
# Cloudflare Pages – custom response headers
# https://developers.cloudflare.com/pages/configuration/headers/
# ── Long-lived immutable assets (hashed filenames) ────────────────────────
/assets/css/*
Cache-Control: public, max-age=31536000, immutable
/assets/js/*
Cache-Control: public, max-age=31536000, immutable
/assets/icons/*
Cache-Control: public, max-age=31536000, immutable
/assets/img/*
Cache-Control: public, max-age=31536000, immutable
# ── PWA / manifest files — recheck daily ──────────────────────────────────
/manifest.json
Cache-Control: public, max-age=86400
/favicon.ico
Cache-Control: public, max-age=86400
# ── Service worker — must always revalidate ───────────────────────────────
/sw.js
Cache-Control: public, max-age=0, must-revalidate
# ── HTML pages — always revalidate ────────────────────────────────────────
/
Cache-Control: public, max-age=0, must-revalidate
# ── Security headers for all responses ────────────────────────────────────
/*
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
X-XSS-Protection: 1; mode=block
Permissions-Policy: geolocation=(), microphone=(), camera=()