Add per asset caching
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
9b19f4f7f3
commit
0fe899d83a
28
netlify.toml
28
netlify.toml
|
@ -12,10 +12,38 @@
|
||||||
to = "https://mat.services/:splat"
|
to = "https://mat.services/:splat"
|
||||||
force = true
|
force = true
|
||||||
|
|
||||||
|
# per asset caching
|
||||||
|
|
||||||
|
[[headers]]
|
||||||
|
for = "/font/*"
|
||||||
|
[headers.values]
|
||||||
|
# a year
|
||||||
|
Cache-Control = "public, max-age=31536000"
|
||||||
|
|
||||||
|
[[headers]]
|
||||||
|
for = "/image/*"
|
||||||
|
[headers.values]
|
||||||
|
# a month
|
||||||
|
Cache-Control = "public, max-age=2592000"
|
||||||
|
|
||||||
|
[[headers]]
|
||||||
|
for = "/*.webp"
|
||||||
|
[headers.values]
|
||||||
|
# a month
|
||||||
|
Cache-Control = "public, max-age=2592000"
|
||||||
|
|
||||||
|
[[headers]]
|
||||||
|
for = "/style/*"
|
||||||
|
[headers.values]
|
||||||
|
# a week
|
||||||
|
Cache-Control = "public, max-age=604800"
|
||||||
|
|
||||||
[[headers]]
|
[[headers]]
|
||||||
for = "/*"
|
for = "/*"
|
||||||
|
|
||||||
[headers.values]
|
[headers.values]
|
||||||
|
# baseline cache, one hour
|
||||||
|
Cache-Control = "public, max-age=3600"
|
||||||
# disable FLoC tracking
|
# disable FLoC tracking
|
||||||
Permissions-Policy = "interest-cohort=()"
|
Permissions-Policy = "interest-cohort=()"
|
||||||
# enable HSTS
|
# enable HSTS
|
||||||
|
|
Loading…
Reference in New Issue