nav resilience after pool restart, thinner marker rings, drop dead marker popup

This commit is contained in:
2026-07-31 10:17:28 -04:00
parent d84f7e3911
commit ff61a4c5e9
6 changed files with 163 additions and 100 deletions

View File

@@ -244,11 +244,23 @@ def register_frontend_routes(app: Flask):
# (the probe was a path-traversal risk surface).
if path:
try:
return send_from_directory(frontend_dist, path)
response = send_from_directory(frontend_dist, path)
# Asset filenames carry a content hash, so a given URL never
# changes - cache them hard. Everything else stays revalidated.
if path.startswith('assets/'):
response.headers['Cache-Control'] = 'public, max-age=31536000, immutable'
else:
response.headers['Cache-Control'] = 'no-cache'
return response
except Exception:
pass
return send_from_directory(frontend_dist, 'index.html')
# index.html names the hashed chunks, so a stale copy points at files a
# deploy has already deleted and the SPA stops navigating. Always
# revalidate it.
response = send_from_directory(frontend_dist, 'index.html')
response.headers['Cache-Control'] = 'no-cache'
return response
def configure_logging(app: Flask):