Add per asset caching
continuous-integration/drone/push Build is passing Details

pull/1/head
mat ess 2022-10-21 00:38:07 -04:00
parent 9b19f4f7f3
commit 0fe899d83a
1 changed files with 28 additions and 0 deletions

View File

@ -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