Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] image_proxy: allow HTTP redirects

Markus Heiserc2d9c93b3baf
diff --git a/searx/webapp.py b/searx/webapp.py
index 5e05f9781..eb08d63d9 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -1132,7 +1132,7 @@ def image_proxy():
'DNT': '1',
}
set_context_network_name('image_proxy')
- resp, stream = http_stream(method='GET', url=url, headers=request_headers)
+ resp, stream = http_stream(method='GET', url=url, headers=request_headers, allow_redirects=True)
content_length = resp.headers.get('Content-Length')
if content_length and content_length.isdigit() and int(content_length) > maximum_size:
return 'Max size', 400