-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_headers
More file actions
161 lines (115 loc) · 4.3 KB
/
_headers
File metadata and controls
161 lines (115 loc) · 4.3 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# ----------------------------
# CACHING STRATEGY
# ----------------------------
# Immutable build assets (hashed filenames)
# Safe to cache for 1 year
/_app/immutable/*
Cache-Control: public, max-age=31536000, immutable
# JavaScript & CSS (extra coverage for any not in _app)
# 1 year cache for static assets
/*.js
Cache-Control: public, max-age=31536000, immutable
/*.css
Cache-Control: public, max-age=31536000, immutable
# Icons (SVGs and UI icons)
# Cached for 1 year, served from /icons/
/icons/*
Cache-Control: public, max-age=31536000, immutable
# Explicit cache headers for all icons (ensure 1-year cache)
/icons/en.svg
Cache-Control: public, max-age=31536000, immutable
/icons/mm.svg
Cache-Control: public, max-age=31536000, immutable
/icons/bars.svg
Cache-Control: public, max-age=31536000, immutable
/icons/linkedin.svg
Cache-Control: public, max-age=31536000, immutable
/icons/github.svg
Cache-Control: public, max-age=31536000, immutable
/icons/gitlab.svg
Cache-Control: public, max-age=31536000, immutable
/icons/instagram.svg
Cache-Control: public, max-age=31536000, immutable
/icons/x.svg
Cache-Control: public, max-age=31536000, immutable
/icons/pypi.svg
Cache-Control: public, max-age=31536000, immutable
/icons/huggingface.svg
Cache-Control: public, max-age=31536000, immutable
/icons/email.svg
Cache-Control: public, max-age=31536000, immutable
# Favicons and brand images
/android-chrome-192x192.png
Cache-Control: public, max-age=31536000, immutable
/android-chrome-512x512.png
Cache-Control: public, max-age=31536000, immutable
/apple-touch-icon.png
Cache-Control: public, max-age=31536000, immutable
/favicon.ico
Cache-Control: public, max-age=31536000, immutable
/favicon-16x16.png
Cache-Control: public, max-age=31536000, immutable
/favicon-32x32.png
Cache-Control: public, max-age=31536000, immutable
/profile.jpg
Cache-Control: public, max-age=31536000, immutable
/profile-sm.jpg
Cache-Control: public, max-age=31536000, immutable
/og-image.jpg
Cache-Control: public, max-age=31536000, immutable
# Generic image, font, and static asset types
/*.jpg
Cache-Control: public, max-age=31536000, immutable
/*.jpeg
Cache-Control: public, max-age=31536000, immutable
/*.png
Cache-Control: public, max-age=31536000, immutable
/*.svg
Cache-Control: public, max-age=31536000, immutable
/*.webp
Cache-Control: public, max-age=31536000, immutable
/*.avif
Cache-Control: public, max-age=31536000, immutable
/*.woff
Cache-Control: public, max-age=31536000, immutable
/*.woff2
Cache-Control: public, max-age=31536000, immutable
Access-Control-Allow-Origin: *
/*.ttf
Cache-Control: public, max-age=31536000, immutable
/*.eot
Cache-Control: public, max-age=31536000, immutable
# Manifest and SEO-related files
/manifest.webmanifest
Cache-Control: public, max-age=604800, stale-while-revalidate=86400
/sitemap.xml
Cache-Control: public, max-age=604800, stale-while-revalidate=86400
/robots.txt
Cache-Control: public, max-age=604800, stale-while-revalidate=86400
# HTML pages
# Short cache + background revalidation + offline fallback
/*.html
Cache-Control: public, max-age=300, stale-while-revalidate=600, stale-if-error=86400, must-revalidate
# Root index
/
Cache-Control: public, max-age=300, stale-while-revalidate=600, stale-if-error=86400, must-revalidate
# 404 page
/404.html
Cache-Control: public, max-age=3600, stale-while-revalidate=86400
# Precompressed assets (optional explicit encoding hints)
/*.br
Content-Encoding: br
/*.gz
Content-Encoding: gzip
# ----------------------------
# SECURITY HEADERS
# ----------------------------
/*
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
Content-Security-Policy: default-src 'self' blob: data: https:; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https:; worker-src 'self' blob:; child-src 'self' blob:; connect-src 'self' blob: data: https:; img-src 'self' blob: data: https:; font-src 'self' data: https:; style-src 'self' 'unsafe-inline' https:; base-uri 'self'; form-action 'self'; frame-ancestors 'none';