html detection

merge-requests/6/head
Bob Mottram 2020-01-09 20:31:00 +00:00
parent 031b788aad
commit 5cb075c209
1 changed files with 6 additions and 3 deletions

View File

@ -296,11 +296,14 @@ class PubServer(BaseHTTPRequestHandler):
if self.server.debug:
print('ACCEPT: '+self.headers['Accept'])
if 'image/' in self.headers['Accept']:
return False
if 'text/html' not in self.headers['Accept']:
return False
if 'video/' in self.headers['Accept']:
return False
if 'text/html' not in self.headers['Accept']:
return False
if 'audio/' in self.headers['Accept']:
return False
if 'text/html' not in self.headers['Accept']:
return False
if self.headers['Accept'].startswith('*'):
return False
if 'json' in self.headers['Accept']: