Try to prevent caching of placeholder

This commit is contained in:
MMaker 2025-02-27 16:05:39 -05:00
parent bca73594f5
commit 753d4c691a
Signed by: mmaker
GPG Key ID: CCE79B8FEDA40FB2

3
app.py
View File

@ -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