@marcel91200 / caddy Mirror · read-only / commits / 6e6ce2be
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 13, 23:00 UTC

caddyhttp: Fix HTTP->HTTPS redir not preferring HTTPS port if ambiguous (#4530)

Francis Lavoie committed Jan 18, 2022 at 13:56 UTC 6e6ce2be6be004f592978d9f020f0185b40af1a7
1 file changed +1 -1
modules/caddyhttp/autohttps.go
+1 -1
@@ -232,7 +232,7 @@ func (app *App) automaticHTTPSPhase1(ctx caddy.Context, repl *caddy.Replacer) er
232 // port, we'll have to choose one, so prefer the HTTPS port
233 if _, ok := redirDomains[d]; !ok ||
234 addr.StartPort == uint(app.httpsPort()) {
235 - redirDomains[d] = append(redirDomains[d], addr)
235 + redirDomains[d] = []caddy.NetworkAddress{addr}
236 }
237 }
238 }