-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_headers
More file actions
49 lines (41 loc) · 1.75 KB
/
_headers
File metadata and controls
49 lines (41 loc) · 1.75 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
39
40
41
42
43
44
45
46
47
48
49
# Cloudflare Pages Headers Configuration
# Security and performance headers for toposlabs.ai
/*
# Security Headers
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=(), interest-cohort=()
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
# Cross-Origin Isolation (protect against Spectre)
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-origin
# Content Security Policy (self-hosted fonts, allowing inline scripts/styles for now)
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self' data:; img-src 'self' data: https:; connect-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'; upgrade-insecure-requests
# HTML files - cache for 1 hour with revalidation
/*.html
Cache-Control: public, max-age=3600, must-revalidate
# Static assets - cache for 1 year (immutable)
/assets/*
Cache-Control: public, max-age=31536000, immutable
# Fonts - cache for 1 year
*.woff2
Cache-Control: public, max-age=31536000, immutable
Cross-Origin-Resource-Policy: cross-origin
# CSS - cache for 1 year
*.css
Cache-Control: public, max-age=31536000, immutable
Cross-Origin-Resource-Policy: cross-origin
# Images - cache for 1 year
*.svg
Cache-Control: public, max-age=31536000, immutable
*.png
Cache-Control: public, max-age=31536000, immutable
*.jpg
Cache-Control: public, max-age=31536000, immutable
*.jpeg
Cache-Control: public, max-age=31536000, immutable
*.webp
Cache-Control: public, max-age=31536000, immutable