mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
Only enforces SNI matching if ClientAuth is enabled (#3096)
This commit is contained in:
parent
4fbdd23283
commit
fa7322365a
1 changed files with 1 additions and 0 deletions
|
@ -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…
Reference in a new issue