Static serving: correct cache headers, no index fallback for assets
ci / docker (push) Successful in 13m11s

- /assets/*: immutable one-year cache on hits, plain 404 on misses
  (previously a missing asset fell back to index.html served as its
  content type, breaking CSS/JS after every deploy for cached clients)
- index.html and SPA routes: no-cache, so deploys are visible immediately
This commit is contained in:
2026-07-17 17:30:13 +02:00
parent 7167af8984
commit 002e51f36e
3 changed files with 29 additions and 4 deletions
+2 -1
View File
@@ -37,7 +37,8 @@ tempfile = "3"
time = "0.3"
tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7", features = ["io"] }
tower-http = { version = "0.6", features = ["fs", "trace"] }
tower = { version = "0.5", features = ["util"] }
tower-http = { version = "0.6", features = ["fs", "set-header", "trace"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
urlencoding = "2"