修复中控
This commit is contained in:
@@ -54,7 +54,10 @@ class Service(db.Model):
|
||||
proto = (self.scheme or "http").strip().lower()
|
||||
if proto not in ("http", "https"):
|
||||
proto = "http"
|
||||
return f"{proto}://{self.host}:{self.port}"
|
||||
port = int(self.port or (443 if proto == "https" else 80))
|
||||
if (proto == "https" and port == 443) or (proto == "http" and port == 80):
|
||||
return f"{proto}://{self.host}"
|
||||
return f"{proto}://{self.host}:{port}"
|
||||
|
||||
def build_url(self) -> str:
|
||||
p = (self.path or "/").strip()
|
||||
|
||||
Reference in New Issue
Block a user