mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-28 01:32:30 -04:00
http: Enable TLS for servers listening only on HTTPS port
It seems silly to have to add a single, empty TLS connection policy to a server to enable TLS when it's only listening on the HTTPS port. We now do this for the user as part of automatic HTTPS (thus, it can be disabled / overridden). See https://caddy.community/t/v2-catch-all-server-with-automatic-tls/6692/2?u=matt
This commit is contained in:
@@ -106,6 +106,7 @@ func (cp ConnectionPolicies) TLSConfig(ctx caddy.Context) (*tls.Config, error) {
|
||||
}
|
||||
|
||||
// ConnectionPolicy specifies the logic for handling a TLS handshake.
|
||||
// An empty policy is valid; safe and sensible defaults will be used.
|
||||
type ConnectionPolicy struct {
|
||||
// How to match this policy with a TLS ClientHello. If
|
||||
// this policy is the first to match, it will be used.
|
||||
|
||||
Reference in New Issue
Block a user