add a js version controling
This commit is contained in:
@@ -245,7 +245,8 @@ def create_app(
|
||||
page = static_dir / "admin.html"
|
||||
if not page.is_file():
|
||||
raise HTTPException(status_code=404, detail="Admin UI is not installed.")
|
||||
return FileResponse(page)
|
||||
# 后台页面本身不缓存,静态 JS 通过版本号刷新,避免发布后浏览器继续跑旧逻辑。
|
||||
return FileResponse(page, headers={"Cache-Control": "no-cache"})
|
||||
|
||||
@application.get("/api/v1/videos", response_model=VideoListResponse)
|
||||
def list_videos() -> VideoListResponse:
|
||||
|
||||
Reference in New Issue
Block a user