-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetlify.toml
More file actions
109 lines (88 loc) · 2.54 KB
/
netlify.toml
File metadata and controls
109 lines (88 loc) · 2.54 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
[build]
publish = "dist"
command = "pnpm run build"
# Redirects for Astro static assets
[[redirects]]
from = "/_astro/*"
to = "/_astro/:splat"
status = 200
# Enable Brotli Compression
[build.processing]
skip_processing = false
[build.processing.css]
bundle = true
minify = true
[build.processing.js]
bundle = true
minify = true
[build.processing.html]
pretty_urls = true
# Global headers
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "SAMEORIGIN"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
Permissions-Policy = "geolocation=(), microphone=(), camera=(), fullscreen=(self)"
Content-Security-Policy = "default-src 'self'; script-src 'self' 'unsafe-inline' https:; style-src 'self' 'unsafe-inline' https:; img-src 'self' data: https: blob:; font-src 'self' data: https:; frame-src https: player.bilibili.com; connect-src 'self' https:; object-src 'none'; worker-src 'self' blob:; child-src 'self' blob: player.bilibili.com;"
# HTML pages
[[headers]]
for = "/*.html"
[headers.values]
Cache-Control = "public, max-age=86400, s-maxage=172800"
Vary = "Accept-Encoding"
# Blog posts
[[headers]]
for = "/*/"
[headers.values]
Cache-Control = "public, max-age=86400, s-maxage=172800"
Vary = "Accept-Encoding"
# Homepage
[[headers]]
for = "/"
[headers.values]
Cache-Control = "public, max-age=1800, s-maxage=3600"
Vary = "Accept-Encoding"
# Static assets
[[headers]]
for = "/fonts/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
Vary = "Accept-Encoding"
[[headers]]
for = "/_astro/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
Vary = "Accept-Encoding"
[[headers]]
for = "/assets/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
Vary = "Accept-Encoding"
[[headers]]
for = "/*.css"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
Vary = "Accept-Encoding"
[[headers]]
for = "/*.js"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
Vary = "Accept-Encoding"
# Images
[[headers]]
for = "/*.jpg"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
Vary = "Accept-Encoding"
[[headers]]
for = "/*.png"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
Vary = "Accept-Encoding"
[[headers]]
for = "/*.webp"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
Vary = "Accept-Encoding"