Accept header for images

master
Bob Mottram 2019-08-24 12:25:34 +01:00
parent fe6e7f900b
commit 3d3486c266
1 changed files with 2 additions and 0 deletions

View File

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