Browse Source
caddyhttp: Fix HTTP->HTTPS redir not preferring HTTPS port if ambiguous (#4530)
master
Francis Lavoie
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
modules/caddyhttp/autohttps.go
|
|
@ -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} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|