main
Bob Mottram 2024-04-08 15:26:58 +01:00
parent 36457c5757
commit 6c0b11aef5
2 changed files with 21 additions and 9 deletions

View File

@ -503,7 +503,13 @@ def daemon_http_get(self) -> None:
progressive_web_app_manifest(self, self.server.base_dir, progressive_web_app_manifest(self, self.server.base_dir,
calling_domain, calling_domain,
referer_domain, referer_domain,
getreq_start_time) getreq_start_time,
self.server.http_prefix,
self.server.domain,
self.server.onion_domain,
self.server.i2p_domain,
self.server.fitness,
self.server.debug)
return return
else: else:
self.path = '/' self.path = '/'

View File

@ -19,7 +19,13 @@ from fitnessFunctions import fitness_performance
def progressive_web_app_manifest(self, base_dir: str, def progressive_web_app_manifest(self, base_dir: str,
calling_domain: str, calling_domain: str,
referer_domain: str, referer_domain: str,
getreq_start_time) -> None: getreq_start_time,
http_prefix: str,
domain: str,
onion_domain: str,
i2p_domain: str,
fitness: {},
debug: bool) -> None:
"""gets the PWA manifest """gets the PWA manifest
""" """
manifest = pwa_manifest(base_dir) manifest = pwa_manifest(base_dir)
@ -27,10 +33,10 @@ def progressive_web_app_manifest(self, base_dir: str,
msg_str = convert_domains(calling_domain, msg_str = convert_domains(calling_domain,
referer_domain, referer_domain,
msg_str, msg_str,
self.server.http_prefix, http_prefix,
self.server.domain, domain,
self.server.onion_domain, onion_domain,
self.server.i2p_domain) i2p_domain)
msg = msg_str.encode('utf-8') msg = msg_str.encode('utf-8')
msglen = len(msg) msglen = len(msg)
@ -39,8 +45,8 @@ def progressive_web_app_manifest(self, base_dir: str,
set_headers(self, protocol_str, msglen, set_headers(self, protocol_str, msglen,
None, calling_domain, False) None, calling_domain, False)
write2(self, msg) write2(self, msg)
if self.server.debug: if debug:
print('Sent manifest: ' + calling_domain) print('Sent manifest: ' + calling_domain)
fitness_performance(getreq_start_time, self.server.fitness, fitness_performance(getreq_start_time, fitness,
'_GET', '_progressive_web_app_manifest', '_GET', '_progressive_web_app_manifest',
self.server.debug) debug)