Факун новый стиль ответа с `make_response`
def index():
response = make_response(render_template('index.html', foo=42))
response.headers['X-Parachutes'] = 'parachutes are cool'
return response
Puzzled Puffin