Update server.py

This commit is contained in:
Nova Cat 2025-01-13 16:22:55 -08:00
parent 738ddadfac
commit d99da841fc

View file

@ -100,11 +100,11 @@ def relay():
tempurl = "/".join(url.split("/")[:-1]) + "/" + goto
goto = f"/gem?gemini={tempurl}"
elif prse.scheme != "gemini":
extra = "<img height=\"12\" src=\"/external.png\">"
extra = "<img height=\"19\" src=\"/external.png\">"
extracomment = f"This link points to an address that isn't gemini ({prse.scheme})"
else:
if prse.hostname != urlparse(fulladdr).hostname:
extra = "<img height=\"12\" src=\"/cross-server.png\">"
extra = "<img height=\"19\" src=\"/cross-server.png\">"
extracomment = f"This link points to an address that isn't from the server you're currently connecting to ({prse.hostname})"
goto = goto.replace("gemini://", "")
goto = f"/gem?gemini={goto}"