diff options
author | Francis Lavoie <lavofr@gmail.com> | 2022-01-18 13:56:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 11:56:00 -0700 |
commit | 6e6ce2be6be004f592978d9f020f0185b40af1a7 (patch) | |
tree | de6bb3a084e2075a96838f91e462e0f110ab9694 /modules | |
parent | 1b7ff5d76c7a3c67b6e0f9b51af78d1b227fdea3 (diff) |
caddyhttp: Fix HTTP->HTTPS redir not preferring HTTPS port if ambiguous (#4530)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/caddyhttp/autohttps.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/autohttps.go b/modules/caddyhttp/autohttps.go index da4428d..6c37d70 100644 --- a/modules/caddyhttp/autohttps.go +++ b/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} } } } |