Set global privacy control header

main
Bob Mottram 2024-06-04 10:42:09 +01:00
parent fa35785d2f
commit 7a7e6048d9
1 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,7 @@ def login_headers(self, file_format: str, length: int,
self.send_header('Host', calling_domain)
self.send_header('WWW-Authenticate',
'title="Login to Epicyon", Basic realm="epicyon"')
self.send_header('Sec-GPC', '1')
self.end_headers()
@ -66,6 +67,7 @@ def logout_redirect(self, redirect: str, calling_domain: str) -> None:
self.send_header('Host', calling_domain)
self.send_header('X-AP-Instance-ID', self.server.instance_id)
self.send_header('Content-Length', '0')
self.send_header('Sec-GPC', '1')
self.end_headers()
@ -102,6 +104,7 @@ def redirect_headers(self, redirect: str, cookie: str,
self.send_header('Host', calling_domain)
self.send_header('X-AP-Instance-ID', self.server.instance_id)
self.send_header('Content-Length', '0')
self.send_header('Sec-GPC', '1')
self.end_headers()
@ -137,6 +140,7 @@ def _set_headers_base(self, file_format: str, length: int, cookie: str,
return
self.send_header('X-AP-Instance-ID', self.server.instance_id)
self.send_header('X-Clacks-Overhead', self.server.clacks)
self.send_header('Sec-GPC', '1')
self.send_header('User-Agent',
'Epicyon/' + __version__ +
'; +' + self.server.http_prefix + '://' +