refactor and remove unused code

This commit is contained in:
yusing
2025-02-10 09:52:53 +08:00
parent eaf191e350
commit 0a7b28caf5
15 changed files with 24 additions and 52 deletions

View File

@@ -280,14 +280,15 @@ func (r *Route) Finalize() {
}
if pp == 0 {
if isDocker {
switch {
case isDocker:
pp = lowestPort(cont.PrivatePortMapping)
if pp == 0 {
pp = lowestPort(cont.PublicPortMapping)
}
} else if r.Scheme == "https" {
case r.Scheme == "https":
pp = 443
} else {
default:
pp = 80
}
}