mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-30 19:55:04 -04:00
caddyhttp: Fix HTTP->HTTPS redir not preferring HTTPS port if ambiguous (#4530)
This commit is contained in:
parent
1b7ff5d76c
commit
6e6ce2be6b
@ -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
|
// port, we'll have to choose one, so prefer the HTTPS port
|
||||||
if _, ok := redirDomains[d]; !ok ||
|
if _, ok := redirDomains[d]; !ok ||
|
||||||
addr.StartPort == uint(app.httpsPort()) {
|
addr.StartPort == uint(app.httpsPort()) {
|
||||||
redirDomains[d] = append(redirDomains[d], addr)
|
redirDomains[d] = []caddy.NetworkAddress{addr}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user