mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-21 08:39:03 +01:00
v0.5-rc2: fixed port being overridden to 80 or 443
This commit is contained in:
@@ -39,10 +39,12 @@ func (e *ProxyEntry) SetDefaults() {
|
||||
if e.Host == "" {
|
||||
e.Host = "localhost"
|
||||
}
|
||||
switch e.Scheme {
|
||||
case "http":
|
||||
e.Port = "80"
|
||||
case "https":
|
||||
e.Port = "443"
|
||||
if e.Port == "" {
|
||||
switch e.Scheme {
|
||||
case "http":
|
||||
e.Port = "80"
|
||||
case "https":
|
||||
e.Port = "443"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user