Skip to content

Commit

Permalink
v0.5-rc2: fixed port being overridden to 80 or 443
Browse files Browse the repository at this point in the history
  • Loading branch information
yusing committed Sep 16, 2024
1 parent c0ebd9f commit 1120991
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/models/proxy_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}

0 comments on commit 1120991

Please sign in to comment.