From 7e95d6bb79ccf36f33ac3e287022f396721d472a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9on=20Tiek=C3=B6tter?= Date: Tue, 31 May 2022 21:07:30 +0200 Subject: [PATCH] [mod] image proxy: allow binary/octet-stream mime type The Petal Search Images engine sends the thumbnails with the binary/octet-stream mime type. --- searx/webapp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/searx/webapp.py b/searx/webapp.py index 86de8840..fa5ca060 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