Robots header options

merge-requests/30/head
Bob Mottram 2021-01-21 23:22:14 +00:00
parent 75dc39de87
commit 22c382ff68
1 changed files with 6 additions and 6 deletions

View File

@ -526,7 +526,7 @@ class PubServer(BaseHTTPRequestHandler):
self.send_header('Host', callingDomain)
self.send_header('WWW-Authenticate',
'title="Login to Epicyon", Basic realm="epicyon"')
self.send_header('X-Robots-Tag', 'noindex')
self.send_header('X-Robots-Tag', 'noindex, nofollow, noarchive, nosnippet')
self.end_headers()
def _logout_headers(self, fileFormat: str, length: int,
@ -538,7 +538,7 @@ class PubServer(BaseHTTPRequestHandler):
self.send_header('Host', callingDomain)
self.send_header('WWW-Authenticate',
'title="Login to Epicyon", Basic realm="epicyon"')
self.send_header('X-Robots-Tag', 'noindex')
self.send_header('X-Robots-Tag', 'noindex, nofollow, noarchive, nosnippet')
self.end_headers()
def _logout_redirect(self, redirect: str, cookie: str,
@ -553,7 +553,7 @@ class PubServer(BaseHTTPRequestHandler):
self.send_header('Host', callingDomain)
self.send_header('InstanceID', self.server.instanceId)
self.send_header('Content-Length', '0')
self.send_header('X-Robots-Tag', 'noindex')
self.send_header('X-Robots-Tag', 'noindex, nofollow, noarchive, nosnippet')
self.end_headers()
def _set_headers_base(self, fileFormat: str, length: int, cookie: str,
@ -571,7 +571,7 @@ class PubServer(BaseHTTPRequestHandler):
self.send_header('Cookie', cookieStr)
self.send_header('Host', callingDomain)
self.send_header('InstanceID', self.server.instanceId)
self.send_header('X-Robots-Tag', 'noindex')
self.send_header('X-Robots-Tag', 'noindex, nofollow, noarchive, nosnippet')
self.send_header('X-Clacks-Overhead', 'GNU Natalie Nguyen')
self.send_header('Accept-Ranges', 'none')
@ -657,7 +657,7 @@ class PubServer(BaseHTTPRequestHandler):
self.send_header('Host', callingDomain)
self.send_header('InstanceID', self.server.instanceId)
self.send_header('Content-Length', '0')
self.send_header('X-Robots-Tag', 'noindex')
self.send_header('X-Robots-Tag', 'noindex, nofollow, noarchive, nosnippet')
self.end_headers()
def _httpReturnCode(self, httpCode: int, httpDescription: str,
@ -677,7 +677,7 @@ class PubServer(BaseHTTPRequestHandler):
self.send_header('Content-Type', 'text/html; charset=utf-8')
msgLenStr = str(len(msg))
self.send_header('Content-Length', msgLenStr)
self.send_header('X-Robots-Tag', 'noindex')
self.send_header('X-Robots-Tag', 'noindex, nofollow, noarchive, nosnippet')
self.end_headers()
if not self._write(msg):
print('Error when showing ' + str(httpCode))