fix: 插件页面强制no-cache + app.js v0712
This commit is contained in:
@@ -13,7 +13,9 @@ def setup_plugin_web_routes(app, service_manager):
|
|||||||
return web.Response(text=f"Plugin {name} not found", status=404)
|
return web.Response(text=f"Plugin {name} not found", status=404)
|
||||||
pages = plugin.get_web_pages()
|
pages = plugin.get_web_pages()
|
||||||
if name in 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"})
|
return web.json_response({"error": "no web page"})
|
||||||
|
|
||||||
async def plugin_sse(request):
|
async def plugin_sse(request):
|
||||||
|
|||||||
@@ -79,6 +79,6 @@
|
|||||||
<script src="./static/js/chart.js?v=0603"></script>
|
<script src="./static/js/chart.js?v=0603"></script>
|
||||||
|
|
||||||
<!-- 🟢 2. 再加载主逻辑 -->
|
<!-- 🟢 2. 再加载主逻辑 -->
|
||||||
<script src="./static/js/app.js?v=0711"></script>
|
<script src="./static/js/app.js?v=0712"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user