image proxy: disable direct_passthrough, so call_on_close works as expected

This commit is contained in:
Alexandre Flament 2023-11-04 11:37:52 +00:00
parent 7605b0315f
commit ffcff58693
1 changed files with 1 additions and 1 deletions

View File

@ -1093,7 +1093,7 @@ def image_proxy():
try:
headers = dict_subset(resp.headers, {'Content-Type', 'Content-Encoding', 'Content-Length', 'Length'})
response = Response(
resp.iter_bytes(), mimetype=resp.headers['Content-Type'], headers=headers, direct_passthrough=True
resp.iter_bytes(), mimetype=resp.headers['Content-Type'], headers=headers, direct_passthrough=False
)
response.call_on_close(close_stream)
return response