forked from
quillmatiq.com/augment
Fork of Chiri for Astro for my blog
1[build]
2 publish = "dist"
3 command = "pnpm run build"
4
5# Redirects for Astro static assets
6[[redirects]]
7 from = "/_astro/*"
8 to = "/_astro/:splat"
9 status = 200
10
11# Enable Brotli Compression
12[build.processing]
13 skip_processing = false
14[build.processing.css]
15 bundle = true
16 minify = true
17[build.processing.js]
18 bundle = true
19 minify = true
20[build.processing.html]
21 pretty_urls = true
22
23# Global headers
24[[headers]]
25 for = "/*"
26 [headers.values]
27 X-Frame-Options = "SAMEORIGIN"
28 X-Content-Type-Options = "nosniff"
29 Referrer-Policy = "strict-origin-when-cross-origin"
30 Permissions-Policy = "geolocation=(), microphone=(), camera=(), fullscreen=(self)"
31 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;"
32
33# HTML pages
34[[headers]]
35 for = "/*.html"
36 [headers.values]
37 Cache-Control = "public, max-age=86400, s-maxage=172800"
38 Vary = "Accept-Encoding"
39
40# Blog posts
41[[headers]]
42 for = "/*/"
43 [headers.values]
44 Cache-Control = "public, max-age=86400, s-maxage=172800"
45 Vary = "Accept-Encoding"
46
47# Homepage
48[[headers]]
49 for = "/"
50 [headers.values]
51 Cache-Control = "public, max-age=1800, s-maxage=3600"
52 Vary = "Accept-Encoding"
53
54# Static assets
55[[headers]]
56 for = "/fonts/*"
57 [headers.values]
58 Cache-Control = "public, max-age=31536000, immutable"
59 Vary = "Accept-Encoding"
60
61[[headers]]
62 for = "/_astro/*"
63 [headers.values]
64 Cache-Control = "public, max-age=31536000, immutable"
65 Vary = "Accept-Encoding"
66
67[[headers]]
68 for = "/assets/*"
69 [headers.values]
70 Cache-Control = "public, max-age=31536000, immutable"
71 Vary = "Accept-Encoding"
72
73[[headers]]
74 for = "/*.css"
75 [headers.values]
76 Cache-Control = "public, max-age=31536000, immutable"
77 Vary = "Accept-Encoding"
78
79[[headers]]
80 for = "/*.js"
81 [headers.values]
82 Cache-Control = "public, max-age=31536000, immutable"
83 Vary = "Accept-Encoding"
84
85# Images
86[[headers]]
87 for = "/*.jpg"
88 [headers.values]
89 Cache-Control = "public, max-age=31536000, immutable"
90 Vary = "Accept-Encoding"
91
92[[headers]]
93 for = "/*.png"
94 [headers.values]
95 Cache-Control = "public, max-age=31536000, immutable"
96 Vary = "Accept-Encoding"
97
98[[headers]]
99 for = "/*.webp"
100 [headers.values]
101 Cache-Control = "public, max-age=31536000, immutable"
102 Vary = "Accept-Encoding"
103
104
105
106
107
108
109