Serve front-end assets with Cache-Control: no-cache

Without an explicit directive ServeDir let browsers heuristically cache
the Flutter bundle, and the service worker kept serving stale assets, so
new icons/images did not appear after an upgrade (even on hard reload).
Force revalidation so users always get the latest assets; unchanged files
still return a cheap 304.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-06-07 18:15:52 -04:00
co-authored by Claude Opus 4.8
parent a12ff62fbd
commit 80f0f54785
2 changed files with 57 additions and 4 deletions
+2 -2
View File
@@ -21,11 +21,11 @@ lazy_static = "1.5.0"
duration-string = { version="0.5.3", features = ["serde"] }
clap = {version="4.5.54", features=["derive"]}
axum = "0.8.8"
tower-http = { version = "0.6.8", features = ["fs", "cors"] }
tower-http = { version = "0.6.8", features = ["fs", "cors", "set-header"] }
r2d2 = "0.8.10"
r2d2_sqlite = "0.32.0"
once_cell = "1.21.3"
tower = "0.5.3"
tower = { version = "0.5.3", features = ["util"] }
utoipa = { version = "5", features = ["axum_extras", "chrono"] }
utoipa-swagger-ui = { version = "9", features = ["axum"] }
simple-dns = "0.11.3"