From a459583d169ff367a320bfd214a602779013499a Mon Sep 17 00:00:00 2001 From: swee Date: Wed, 15 Jan 2025 15:39:15 -0800 Subject: [PATCH] Update server.py --- server.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server.py b/server.py index 015dce0..cf492a2 100644 --- a/server.py +++ b/server.py @@ -205,6 +205,11 @@ def relay(): isabs = goto[0] == "/" or goto[0:2] == "//" isquery = goto[0] == "?" dubleslash = goto[0:2] == "//" + if url = urlparse(fulladdr).hostname: + isquery=False + isabs=False + isdir=True + goto = f"/{goto}" if goto[0] != / else goto if isquery: tempurl = url qury = goto[1:]