1
0

docs: make static deploy cache-safe

This commit is contained in:
2026-08-19 03:35:30 -07:00
parent 20deae2a0f
commit 8738367258
2 changed files with 24 additions and 0 deletions
+12
View File
@@ -12,6 +12,10 @@
# tera.lumbridgecorp.com {
# import tera_api
# root * /srv/tera/dist
# @assets path /assets/*
# header @assets Cache-Control "public, max-age=31536000, immutable"
# @documents not path /assets/*
# header @documents Cache-Control "no-cache"
# file_server
# }
#
@@ -32,6 +36,10 @@
# office.lumbridgecorp.com {
# import tera_api
# root * /srv/tera/dist # the SAME root as tera., not a copy
# @assets path /assets/*
# header @assets Cache-Control "public, max-age=31536000, immutable"
# @documents not path /assets/*
# header @documents Cache-Control "no-cache"
# try_files {path} {path}/index.html /office.html
# file_server
# }
@@ -42,6 +50,10 @@
# either. The only line that differs between the two site blocks is the
# `try_files` fallback.
#
# Keep the cache rules in the static handler when the site also serves the API.
# The HTML shells and RELEASE_SHA are stable names and must revalidate after a
# deploy; Vite's /assets/* files are content-addressed and may stay immutable.
#
# A deployment that skips this is not broken: the office door keeps working and
# simply unfurls with the city's card, which is what it did before there was a
# second shell at all.