mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-31 16:39:06 +08:00
Created app package, and better TLS compatibility with HTTP/2
This commit is contained in:
@ -132,17 +132,11 @@ func ListenAndServeTLSWithSNI(srv *http.Server, tlsConfigs []TLSConfig) error {
|
||||
}
|
||||
config.BuildNameToCertificate()
|
||||
|
||||
// Here we change some crypto/tls defaults based on caddyfile
|
||||
// If no config provided, we set defaults focused in security
|
||||
|
||||
// Add a session cache LRU algorithm
|
||||
// Customize our TLS configuration
|
||||
config.ClientSessionCache = tls.NewLRUClientSessionCache(tlsConfigs[0].CacheSize)
|
||||
|
||||
config.MinVersion = tlsConfigs[0].ProtocolMinVersion
|
||||
config.MaxVersion = tlsConfigs[0].ProtocolMaxVersion
|
||||
config.CipherSuites = tlsConfigs[0].Ciphers
|
||||
|
||||
// Server ciphers have priority over client ciphers
|
||||
config.PreferServerCipherSuites = true
|
||||
|
||||
conn, err := net.Listen("tcp", addr)
|
||||
|
Reference in New Issue
Block a user