-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetlify.toml
More file actions
57 lines (47 loc) 路 1.73 KB
/
Copy pathnetlify.toml
File metadata and controls
57 lines (47 loc) 路 1.73 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
[[plugins]]
package = "netlify-plugin-cache"
[plugins.inputs]
paths = [ ".cache" ]
[[headers]]
for = "/*"
[headers.values]
Content-Security-Policy = "upgrade-insecure-requests;"
X-Content-Type-Options = "nosniff"
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
Referrer-Policy = "strict-origin-when-cross-origin"
Permissions-Policy = "autoplay=(), camera=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), publickey-credentials-get=()"
Cache-Control = "public, max-age=0, must-revalidate, stale-while-revalidate=60"
# Unhashed JS/CSS/images: cache for a month, then reuse while revalidating.
# ETags still let Netlify 304 when the file has not changed.
[[headers]]
for = "/assets/*"
[headers.values]
Cache-Control = "public, max-age=2592000, stale-while-revalidate=31536000"
# Self-hosted fonts use family/weight/subset in the filename.
[[headers]]
for = "/assets/fonts/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
Access-Control-Allow-Origin = "*"
# Content-hashed Eleventy outputs (image transform + JS bundles).
# Filenames change when the bytes change, so they can be cached forever.
[[headers]]
for = "/img/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/bundle/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/favicon.svg"
[headers.values]
Cache-Control = "public, max-age=2592000, stale-while-revalidate=31536000"
[[headers]]
for = "/favicon.ico"
[headers.values]
Cache-Control = "public, max-age=2592000, stale-while-revalidate=31536000"
[build]
command = "npm run build"
publish = "dist"