From fdafb027290925b81fc405e2df4fac5dda87c6db Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 10 Jan 2023 14:15:40 +0000 Subject: [PATCH] Tidying --- daemon.py | 7 +++---- webfinger.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/daemon.py b/daemon.py index d9dc3ace1..a7527db53 100644 --- a/daemon.py +++ b/daemon.py @@ -1733,16 +1733,15 @@ class PubServer(BaseHTTPRequestHandler): if self.path.startswith('/.well-known/protocol-handler'): if calling_domain.endswith('.onion'): protocol_url = \ - wellknown_protocol_handler(self.path, - self.server.base_dir, 'http', + wellknown_protocol_handler(self.path, 'http', self.server.onion_domain) elif calling_domain.endswith('.i2p'): protocol_url = \ - wellknown_protocol_handler(self.path, self.server.base_dir, + wellknown_protocol_handler(self.path, 'http', self.server.i2p_domain) else: protocol_url = \ - wellknown_protocol_handler(self.path, self.server.base_dir, + wellknown_protocol_handler(self.path, self.server.http_prefix, self.server.domain_full) if protocol_url: diff --git a/webfinger.py b/webfinger.py index a007d5cd3..934770361 100644 --- a/webfinger.py +++ b/webfinger.py @@ -252,7 +252,7 @@ def webfinger_meta(http_prefix: str, domain_full: str) -> str: return meta_str -def wellknown_protocol_handler(path: str, base_dir: str, +def wellknown_protocol_handler(path: str, http_prefix: str, domain_full: str) -> {}: """See https://fedi-to.github.io/protocol-handler.html """