-
Notifications
You must be signed in to change notification settings - Fork 0
/
netlify.toml
68 lines (58 loc) · 2.8 KB
/
netlify.toml
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
[build.environment]
NODE_VERSION = "18.17.1"
[build]
publish = "dist"
functions = ".netlify/functions" # netlify dev uses this directory to scaffold and serve your functions
command = "pnpm prod || ( npm install pnpm && pnpm prod )"
[dev]
autoLaunch = true
framework = "astro" # #custom
command = "pnpm run dev"
targetPort = 4321
functions = ".netlify/functions" # netlify dev uses this directory to scaffold and serve your functions
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
[[headers]]
for = "/manifest.webmanifest"
[headers.values]
Content-Type = "application/manifest+json"
[[headers]]
for = "/*"
[headers.values]
X-Clacks-Overhead = "GNU Terry Pratchett"
X-Frame-Options = "SAMEORIGIN"
X-XSS-Protection = "1; mode=block"
# X-Content-Type-Options = "nosniff"
# https://report-uri.com/home/generate
Content-Security-Policy = ""
# Content-Security-Policy = "default-src 'self' 'unsafe-inline' *.googletagmanager.com *.google-analytics.com *.cloudfront.net; prefetch-src 'self'; connect-src 'self' google-analytics.com *.google-analytics.com; img-src 'self' 'unsafe-inline' *.google-analytics.com; media-src 'self' *.youtube.com; style-src 'self' 'unsafe-inline' googleapis.com *.googleapis.com cloudfront.net *.cloudfront.net; script-src 'self' 'unsafe-inline' *.google-analytics.com *.googletagmanager.com *.cloudfront.net; frame-src 'self' https://www.youtube.com/ https://vimeo.com; form-action 'self' https:; object-src 'none'; require-trusted-types-for 'script';"
Referrer-Policy = "strict-origin-when-cross-origin"
Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
Accept-CH = "Downlink,RTT,Device-Memory,Save-Data,DPR,Width"
# Permissions-Policy = "vibrate 'none'; geolocation 'none'; midi 'none'; notifications 'none'; push 'none'; sync-xhr 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; speaker 'none'; vibrate 'none'; fullscreen 'none'; payment 'none'"
Permissions-Policy = "autoplay=(), camera=(), geolocation=(), microphone=(), midi=(), usb=()"
# https://codewithhugo.com/enable-cdn-netlify/
[[headers]]
for = "*.css"
[headers.values]
Cache-Control = "max-age=604800, must-revalidate, public"
[[headers]]
for = "*.js"
[headers.values]
Cache-Control = "max-age=604800, must-revalidate, public" # 1 week
# https://www.tempertemper.net/blog/caching-fonts-on-netlify
# 604800 for a week
# 2592000 for a month
# 15768000 for six months
# 31536000 for 1 year
[[headers]]
for = "/fonts/*"
[headers.values]
# Cache-Control = "public, max-age=2592000" # 1 month
Cache-Control = "max-age=15768000, immutable, public"
# [[headers]]
# for = "/*.(ttf|ttc|otf|eot|woff|woff2)"
# [headers.values]
# Cache-Control = "max-age=31536000, immutable, public" # 1 year