Solution
def f():
resp = requests.get(...)
flask_resp = Response(response=resp.text)
for key, value in resp.headers.items():
flask_resp.headers[key] = value
return flask_resp
< Transfer-Encoding: chunked
<
* Illegal or missing hexadecimal sequence in chunked-encoding
* Closing connection 0
curl: (56) Illegal or missing hexadecimal sequence in chunked-encoding
def f():
resp = requests.get(...)
flask_resp = Response(response=resp.text)
for key, value in resp.headers.items():
if key == 'Set-Cookie':
flask_resp.headers[key] = value
return flask_resp