-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy path_headers
More file actions
43 lines (37 loc) · 1.17 KB
/
Copy path_headers
File metadata and controls
43 lines (37 loc) · 1.17 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
# 针对静态资源开启长期缓存
/css/*
Cache-Control: public, max-age=31536000, immutable
/js/*
Cache-Control: public, max-age=31536000, immutable
/fonts/*
Cache-Control: public, max-age=31536000, immutable
/audio/*
Cache-Control: public, max-age=31536000, immutable
/icons/*
Cache-Control: public, max-age=31536000, immutable
# 针对入口文件和 Service Worker 开启验证缓存(确保更新能及时下发)
/index.html
Cache-Control: public, max-age=0, must-revalidate
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Referrer-Policy: strict-origin-when-cross-origin
/library/*
Cache-Control: public, max-age=3600, must-revalidate
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
/sw.js
Cache-Control: public, max-age=0, must-revalidate
/data/*
Cache-Control: public, max-age=0, must-revalidate
# SEO and Security Headers
/*
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
# Sitemap and Robots
/sitemap.xml
Cache-Control: public, max-age=86400
Content-Type: application/xml
/robots.txt
Cache-Control: public, max-age=86400
Content-Type: text/plain