ui: no-store cache headers, synopsis below episode grid
- no-store on everything except /stream: stale cached app.js (old CDN hls.js ref) was the cause of the black screen — video plays fine in a real Chromium once the fresh JS loads (verified via playwright) - synopsis moved under the episode grid
This commit is contained in:
1 parent
6c752ae5bc
commit
a3a58e7d3c
2 files changed
+12
-1
No files matched your search
@@ -33,6 +33,15 @@ def _upstream(fn, *a, **kw):
|
||||
raise HTTPException(502, f"upstream error: {e}")
|
||||
|
||||
|
||||
@app.middleware("http")
|
||||
async def no_cache(request, call_next):
|
||||
# ponytail: no-store on everything except /stream (segments should cache)
|
||||
r = await call_next(request)
|
||||
if not request.url.path.startswith("/stream"):
|
||||
r.headers["Cache-Control"] = "no-store"
|
||||
return r
|
||||
|
||||
|
||||
@app.get("/api/search")
|
||||
def api_search(q: str = Query(min_length=1)):
|
||||
return _upstream(upstream.search, q)
|
||||
|
||||
Reference in new issue
Block a user