excluded_headers = ['content-encoding', 'content-length',
    'transfer-encoding', 'connection']
headers = [(name, value) for name, value in list(resp.raw.headers.items()) if 
    name.lower() not in excluded_headers]
response = Response(resp.content, resp.status_code, headers)
return response
Proxying to another web service with Flask