fix:修复页面bug

This commit is contained in:
丹尼尔
2026-03-11 12:21:25 +08:00
parent dae013dbeb
commit 6da73da8d7
6 changed files with 177 additions and 60 deletions

View File

@@ -488,7 +488,11 @@ async def slider_asset_proxy(path: str):
if resp.status_code >= 400:
raise HTTPException(status_code=resp.status_code, detail=resp.text[:200])
media_type = "application/javascript" if path.endswith(".js") else "application/octet-stream"
return Response(content=resp.content, media_type=media_type)
return Response(
content=resp.content,
media_type=media_type,
headers={"Cache-Control": "no-store, no-cache, must-revalidate", "Pragma": "no-cache"},
)
except HTTPException:
raise
except Exception as e: