mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
63ee0e0c54
commit
fdafb02729
|
@ -1733,16 +1733,15 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if self.path.startswith('/.well-known/protocol-handler'):
|
if self.path.startswith('/.well-known/protocol-handler'):
|
||||||
if calling_domain.endswith('.onion'):
|
if calling_domain.endswith('.onion'):
|
||||||
protocol_url = \
|
protocol_url = \
|
||||||
wellknown_protocol_handler(self.path,
|
wellknown_protocol_handler(self.path, 'http',
|
||||||
self.server.base_dir, 'http',
|
|
||||||
self.server.onion_domain)
|
self.server.onion_domain)
|
||||||
elif calling_domain.endswith('.i2p'):
|
elif calling_domain.endswith('.i2p'):
|
||||||
protocol_url = \
|
protocol_url = \
|
||||||
wellknown_protocol_handler(self.path, self.server.base_dir,
|
wellknown_protocol_handler(self.path,
|
||||||
'http', self.server.i2p_domain)
|
'http', self.server.i2p_domain)
|
||||||
else:
|
else:
|
||||||
protocol_url = \
|
protocol_url = \
|
||||||
wellknown_protocol_handler(self.path, self.server.base_dir,
|
wellknown_protocol_handler(self.path,
|
||||||
self.server.http_prefix,
|
self.server.http_prefix,
|
||||||
self.server.domain_full)
|
self.server.domain_full)
|
||||||
if protocol_url:
|
if protocol_url:
|
||||||
|
|
|
@ -252,7 +252,7 @@ def webfinger_meta(http_prefix: str, domain_full: str) -> str:
|
||||||
return meta_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) -> {}:
|
http_prefix: str, domain_full: str) -> {}:
|
||||||
"""See https://fedi-to.github.io/protocol-handler.html
|
"""See https://fedi-to.github.io/protocol-handler.html
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue