mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-09 13:02:33 +02:00
v0.5-rc2: fixed port being overridden to 80 or 443
This commit is contained in:
parent
c0ebd9f8c0
commit
1120991019
1 changed files with 7 additions and 5 deletions
|
@ -39,10 +39,12 @@ func (e *ProxyEntry) SetDefaults() {
|
||||||
if e.Host == "" {
|
if e.Host == "" {
|
||||||
e.Host = "localhost"
|
e.Host = "localhost"
|
||||||
}
|
}
|
||||||
switch e.Scheme {
|
if e.Port == "" {
|
||||||
case "http":
|
switch e.Scheme {
|
||||||
e.Port = "80"
|
case "http":
|
||||||
case "https":
|
e.Port = "80"
|
||||||
e.Port = "443"
|
case "https":
|
||||||
|
e.Port = "443"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue