fix: index.html强制no-cache(浏览器缓存致前端改动不生效,子Tab看不到根因)
This commit is contained in:
@@ -230,7 +230,12 @@ def _save_watchlist(data):
|
||||
|
||||
@app.route("/")
|
||||
def index():
|
||||
return send_from_directory(app.static_folder, "index.html")
|
||||
# 2026-08-18 强制不缓存 index.html(浏览器缓存导致前端改动不生效,老莫反馈子Tab看不到)
|
||||
resp = send_from_directory(app.static_folder, "index.html")
|
||||
resp.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
|
||||
resp.headers["Pragma"] = "no-cache"
|
||||
resp.headers["Expires"] = "0"
|
||||
return resp
|
||||
|
||||
|
||||
@app.route("/api/watch")
|
||||
|
||||
Reference in New Issue
Block a user