Browse Source

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

master
Francis Lavoie 3 years ago
committed by GitHub
parent
commit
6e6ce2be6b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/caddyhttp/autohttps.go

2
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}
}
}
}

Loading…
Cancel
Save