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:
@ -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():
|
||||
|
||||
Reference in New Issue
Block a user