-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path_headers
More file actions
84 lines (67 loc) · 2.21 KB
/
_headers
File metadata and controls
84 lines (67 loc) · 2.21 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
/*
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=()
# JavaScript modules - ensure proper MIME type and long cache
/*.js
Content-Type: text/javascript; charset=utf-8
Cache-Control: public, max-age=31536000, immutable
/*.mjs
Content-Type: text/javascript; charset=utf-8
Cache-Control: public, max-age=31536000, immutable
# ES modules - explicit type for module scripts with versioned cache busting
/assets/*.js
Content-Type: text/javascript; charset=utf-8
Cache-Control: public, max-age=31536000, immutable
# CSS files with long cache
/*.css
Content-Type: text/css; charset=utf-8
Cache-Control: public, max-age=31536000, immutable
# Images with long cache
/*.png
Content-Type: image/png
Cache-Control: public, max-age=31536000, immutable
/*.webp
Content-Type: image/webp
Cache-Control: public, max-age=31536000, immutable
/*.svg
Content-Type: image/svg+xml
Cache-Control: public, max-age=31536000, immutable
/*.avif
Content-Type: image/avif
Cache-Control: public, max-age=31536000, immutable
/*.jpg
Content-Type: image/jpeg
Cache-Control: public, max-age=31536000, immutable
/*.jpeg
Content-Type: image/jpeg
Cache-Control: public, max-age=31536000, immutable
# Fonts with long cache
/*.woff2
Content-Type: font/woff2
Cache-Control: public, max-age=31536000, immutable
/*.woff
Content-Type: font/woff
Cache-Control: public, max-age=31536000, immutable
/*.ttf
Content-Type: font/ttf
Cache-Control: public, max-age=31536000, immutable
# JSON files
/*.json
Content-Type: application/json; charset=utf-8
Cache-Control: public, max-age=86400
# WASM files
/*.wasm
Content-Type: application/wasm
Cache-Control: public, max-age=31536000, immutable
# Analytics chunks - cache with lower priority
/assets/analytics-*.js
Content-Type: text/javascript; charset=utf-8
Cache-Control: public, max-age=31536000, immutable
# Ensure React loads with highest priority
/assets/react-*.js
Content-Type: text/javascript; charset=utf-8
Cache-Control: public, max-age=31536000, immutable
Link: </assets/react-*.js>; rel=preload; as=script; crossorigin