The problem is I am unable to send headers when using send_file, is there any workaround for this?
send_file
I want to be able to send headers when sending files to client.
return send_file(mp3_filepath, 'audio/mpeg')
from flask import make_response, send_file response = make_response(send_file(mp3_filepath)) response.headers['X-Something'] = 'header value goes here' return response