Skip to content

Commit

Permalink
caddyhttp: Fix HTTP->HTTPS redir not preferring HTTPS port if ambiguo…
Browse files Browse the repository at this point in the history
…us (#4530)
  • Loading branch information
francislavoie committed Jan 18, 2022
1 parent 1b7ff5d commit 6e6ce2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/caddyhttp/autohttps.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (app *App) automaticHTTPSPhase1(ctx caddy.Context, repl *caddy.Replacer) er
// port, we'll have to choose one, so prefer the HTTPS port
if _, ok := redirDomains[d]; !ok ||
addr.StartPort == uint(app.httpsPort()) {
redirDomains[d] = append(redirDomains[d], addr)
redirDomains[d] = []caddy.NetworkAddress{addr}
}
}
}
Expand Down

0 comments on commit 6e6ce2b

Please sign in to comment.