prevent cache
All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m9s

This commit is contained in:
2026-02-09 22:20:16 -05:00
parent 24b0c07620
commit fa287261d0
2 changed files with 8 additions and 3 deletions

7
app.py
View File

@@ -221,7 +221,12 @@ def preview_video(file_id):
if not os.path.exists(output_path):
return jsonify({'error': 'File not found'}), 404
return send_file(output_path, mimetype='video/mp4')
response = send_file(output_path, mimetype='video/mp4')
# Prevent caching
response.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, max-age=0'
response.headers['Pragma'] = 'no-cache'
response.headers['Expires'] = '0'
return response
except Exception as e:
return jsonify({'error': str(e)}), 500