mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-29 06:31:32 +00:00
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:
parent
d62964cdfa
commit
4519d2b476
1 changed files with 5 additions and 1 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue