diff options
author | Léon Tiekötter <leon@tiekoetter.com> | 2022-05-31 21:07:30 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2022-06-02 14:32:37 +0200 |
commit | 7e95d6bb79ccf36f33ac3e287022f396721d472a (patch) | |
tree | b9a47bfa44c3abf442d3d7078ad3bffe41877afe | |
parent | 43dc9eb7d64ddcdc07639129b9dbbc96c92d3caa (diff) | |
download | searxng-7e95d6bb79ccf36f33ac3e287022f396721d472a.tar.gz searxng-7e95d6bb79ccf36f33ac3e287022f396721d472a.zip |
[mod] image proxy: allow binary/octet-stream mime type
The Petal Search Images engine sends the thumbnails with the binary/octet-stream mime type.
-rwxr-xr-x | searx/webapp.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 86de88407..fa5ca0605 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1163,7 +1163,9 @@ def image_proxy(): return '', resp.status_code return '', 400 - if not resp.headers.get('Content-Type', '').startswith('image/'): + if not resp.headers.get('Content-Type', '').startswith('image/') and not resp.headers.get( + 'Content-Type', '' + ).startswith('binary/octet-stream'): logger.debug('image-proxy: wrong content-type: %s', resp.headers.get('Content-Type', '')) return '', 400 |