diff --git a/deploy/Caddyfile.tmpl b/deploy/Caddyfile.tmpl index 044f3c4..8339e02 100644 --- a/deploy/Caddyfile.tmpl +++ b/deploy/Caddyfile.tmpl @@ -36,12 +36,15 @@ __HOST__ { # Everything else is the static site. SvelteKit writes each route as # .html, so /rules is tried as /rules.html before falling back to the # app shell, which serves the rooms. Hashed assets under _app/immutable are - # cached for a year; every other response is revalidated so a deploy shows - # up on the next load. + # cached for a year, and the glass board's figures, which weigh a few + # megabytes and seldom change, for a week; every other response is + # revalidated so a deploy shows up on the next load. handle { @immutable path /_app/immutable/* header @immutable Cache-Control "public, max-age=31536000, immutable" - @mutable not path /_app/immutable/* + @figures path /figures/* + header @figures Cache-Control "public, max-age=604800" + @mutable not path /_app/immutable/* /figures/* header @mutable Cache-Control "no-cache" try_files {path} {path}.html /index.html file_server