diff --git a/services/web_panel/manager.py b/services/web_panel/manager.py
index 3e93562..530886d 100644
--- a/services/web_panel/manager.py
+++ b/services/web_panel/manager.py
@@ -63,7 +63,12 @@ class WebPanelManager:
# URL 前缀: /SenSu/static/ -> 物理路径: .../static/web_panel/
static_dir = self.project_root / "static" / "web_panel"
if static_dir.exists():
- app.router.add_static(f'{self.base_path}/static/', path=str(static_dir))
+ # 静态文件添加 no-cache
+ async def _static_handler(request):
+ resp = await static_handler(request)
+ resp.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate'
+ return resp
+ app.router.add_static(f'{self.base_path}/static/', path=str(static_dir))
logger.info(f"📂 静态资源已挂载: {self.base_path}/static/")
else:
logger.warning(f"⚠️ 静态目录缺失: {static_dir}")
diff --git a/static/web_panel/home.html b/static/web_panel/home.html
index a256b89..9a75c3d 100644
--- a/static/web_panel/home.html
+++ b/static/web_panel/home.html
@@ -79,6 +79,6 @@
-
+