diff options
Diffstat (limited to 'modules/caddytls')
-rw-r--r-- | modules/caddytls/connpolicy.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/caddytls/connpolicy.go b/modules/caddytls/connpolicy.go index 9400034..a085fa3 100644 --- a/modules/caddytls/connpolicy.go +++ b/modules/caddytls/connpolicy.go @@ -75,7 +75,11 @@ type ConnectionPolicy struct { } func (cp *ConnectionPolicy) buildStandardTLSConfig(handle caddy2.Handle) error { - tlsApp := handle.App("tls").(*TLS) + tlsAppIface, err := handle.App("tls") + if err != nil { + return fmt.Errorf("getting tls app: %v", err) + } + tlsApp := tlsAppIface.(*TLS) cfg := &tls.Config{ NextProtos: cp.ALPN, |