From 753d4c691a40b4ecb2a3dc819b53134363b88068 Mon Sep 17 00:00:00 2001 From: MMaker Date: Thu, 27 Feb 2025 16:05:39 -0500 Subject: [PATCH] Try to prevent caching of placeholder --- app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app.py b/app.py index 17de262..b52b221 100644 --- a/app.py +++ b/app.py @@ -307,6 +307,9 @@ def cdn_redirect(video_id): logger.info(f"{video_id}: Video not found in CDN, returning placeholder") response = make_response(send_file(BytesIO(placeholder_video), mimetype="video/mp4")) response.headers['Content-Length'] = str(len(placeholder_video)) + response.headers['Cache-Control'] = 'no-cache' + response.headers['Pragma'] = 'no-cache' + response.headers['Expires'] = '0' return response