fix: 插件页面强制no-cache + app.js v0712

This commit is contained in:
qinglong
2026-06-14 11:45:07 +08:00
parent 0735559b1a
commit f532a63a49
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -13,7 +13,9 @@ def setup_plugin_web_routes(app, service_manager):
return web.Response(text=f"Plugin {name} not found", status=404)
pages = plugin.get_web_pages()
if name in pages:
return web.Response(text=pages[name]["html"], content_type="text/html")
resp = web.Response(text=pages[name]["html"], content_type="text/html")
resp.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
return resp
return web.json_response({"error": "no web page"})
async def plugin_sse(request):