Static files sent with Cache-Control: no-cache (revalidated, a 304 when unchanged): unversioned /vendor modules were cached heuristically, so a tablet kept the old mdi.mjs after the deploy that added the lock icons and the new icons.js failed to import from it, leaving a blank map
CI / check (push) Successful in 18s
CI / deploy (push) Successful in 18s

This commit is contained in:
randy committed 2026-11-18 23:24:15 +01:00
1 parent f09216b102
commit a21e2b0bc6
2 files changed
+16

No files matched your search

+9
View File
@@ -34,6 +34,15 @@ class AppTest < Minitest::Test
end
end
# Unversioned /vendor modules must be revalidated, or a deploy adding an
# export to one (imported by a freshly versioned /js module) breaks a
# browser still holding the old copy — see static_cache_control in app.rb.
def test_static_files_are_revalidated
response = request.get("/vendor/mdi/mdi.mjs")
assert_equal 200, response.status
assert_includes response.headers["Cache-Control"], "no-cache"
end
def test_offline_tiles_reports_unavailable_when_no_pmtiles_present
response = request.get("/api/offline-tiles")
assert_equal({ "available" => false }, json_body(response))