forked from mikepsinn/disease-eradication-plan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetlify.toml
More file actions
72 lines (61 loc) · 1.93 KB
/
netlify.toml
File metadata and controls
72 lines (61 loc) · 1.93 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
[build]
# Site is built by GitHub Actions, not Netlify.
# Netlify only serves the pre-built files.
publish = "_site/1-pct-treaty-impact"
[build.processing]
skip_processing = false
# Headers for security and caching
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "SAMEORIGIN"
X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
[[headers]]
for = "/*.html"
[headers.values]
Cache-Control = "public, max-age=0, must-revalidate"
[[headers]]
for = "/assets/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
# Root-level CSS/JS are NOT content-hashed (e.g. /styles.css, /book-overrides.css).
# Fresh 1hr, serve-stale-while-revalidating for 24hr. SCSS/CSS edits propagate
# within ~1hr everywhere without a revalidation roundtrip on repeat visitors.
# If a change is urgent, purge the Netlify+Cloudflare caches manually on deploy.
# Netlify's `*` does not cross `/`, so these rules only match root-level files —
# hashed assets under /site_libs/** keep Netlify's default long cache.
[[headers]]
for = "/*.css"
[headers.values]
Cache-Control = "public, max-age=3600, stale-while-revalidate=86400"
[[headers]]
for = "/*.js"
[headers.values]
Cache-Control = "public, max-age=3600, stale-while-revalidate=86400"
# Domain redirects - redirect old dih.earth domains to warondisease.org
[[redirects]]
from = "https://impact.dih.earth/*"
to = "https://impact.warondisease.org/:splat"
status = 301
force = true
[[redirects]]
from = "https://models.dih.earth/*"
to = "https://impact.warondisease.org/:splat"
status = 301
force = true
# Redirects for clean URLs
[[redirects]]
from = "/index.html"
to = "/"
status = 301
force = true
# 404 page
[[redirects]]
from = "/*"
to = "/404.html"
status = 404
# Enable Pretty URLs (remove .html extension)
[build.processing.html]
pretty_urls = true