fix(web): add Cache-Control: no-store to plugin static file serving

Prevents browser caching of stale dashboard plugin JS files that may
contain bugs already fixed upstream (e.g. COLUMN_LABEL undefined).
This commit is contained in:
momowind 2026-05-18 20:13:29 -07:00 committed by Teknium
parent d62964cdfa
commit 4519d2b476

View file

@ -4346,7 +4346,11 @@ async def serve_plugin_asset(plugin_name: str, file_path: str):
".woff": "font/woff",
}
media_type = content_types.get(suffix, "application/octet-stream")
return FileResponse(target, media_type=media_type)
return FileResponse(
target,
media_type=media_type,
headers={"Cache-Control": "no-store, no-cache, must-revalidate"},
)
def _mount_plugin_api_routes():