We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e2510e commit 8d7ac18Copy full SHA for 8d7ac18
modules/caddytls/connpolicy.go
@@ -119,6 +119,9 @@ func (cp ConnectionPolicies) TLSConfig(_ caddy.Context) *tls.Config {
119
continue policyLoop
120
}
121
122
+ if pol.Drop {
123
+ return nil, fmt.Errorf("dropping connection")
124
+ }
125
return pol.TLSConfig, nil
126
127
@@ -156,6 +159,9 @@ type ConnectionPolicy struct {
156
159
// Maximum TLS protocol version to allow. Default: `tls1.3`
157
160
ProtocolMax string `json:"protocol_max,omitempty"`
158
161
162
+ // Reject TLS connections. EXPERIMENTAL: May change.
163
+ Drop bool `json:"drop,omitempty"`
164
+
165
// Enables and configures TLS client authentication.
166
ClientAuthentication *ClientAuthentication `json:"client_authentication,omitempty"`
167
0 commit comments