mirror of
https://github.com/caddyserver/caddy.git
synced 2025-04-23 05:07:50 +08:00
Only enforces SNI matching if ClientAuth is enabled (#3096)
This commit is contained in:
parent
4fbdd23283
commit
fa7322365a
@ -448,6 +448,7 @@ func (s *Server) serveHTTP(w http.ResponseWriter, r *http.Request) (int, error)
|
||||
// sites that rely on TLS ClientAuth sharing a port with
|
||||
// sites that do not - if mismatched, close the connection
|
||||
if !vhost.TLS.InsecureDisableSNIMatching && r.TLS != nil &&
|
||||
vhost.TLS.ClientAuth != tls.NoClientCert &&
|
||||
strings.ToLower(r.TLS.ServerName) != strings.ToLower(hostname) {
|
||||
r.Close = true
|
||||
log.Printf("[ERROR] %s - strict host matching: SNI (%s) and HTTP Host (%s) values differ",
|
||||
|
Loading…
x
Reference in New Issue
Block a user