Check for image

master
Bob Mottram 2019-08-27 17:27:48 +01:00
parent 92580b8e33
commit 2b07d685e3
1 changed files with 3 additions and 1 deletions

View File

@ -152,7 +152,9 @@ class PubServer(BaseHTTPRequestHandler):
def _requestHTTP(self) -> bool:
"""Should a http response be given?
"""
if '*/*' in self.headers['Accept']:
if 'image/' in self.headers['Accept']:
return False
if self.headers['Accept'].startswith('*'):
return False
if 'json' in self.headers['Accept']:
return False