nav resilience after pool restart, thinner marker rings, drop dead marker popup
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user