mirror of
https://github.com/caddyserver/caddy.git
synced 2026-08-27 04:07:28 +00:00
Instantiate apps that are needed but not explicitly configured
This commit is contained in:
parent
43961b542b
commit
5859cd8dad
4 changed files with 44 additions and 19 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue