summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/caddytls/connpolicy.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddytls/connpolicy.go b/modules/caddytls/connpolicy.go
index 46a8eda..a4dc411 100644
--- a/modules/caddytls/connpolicy.go
+++ b/modules/caddytls/connpolicy.go
@@ -54,7 +54,7 @@ func (cp ConnectionPolicies) Provision(ctx caddy.Context) error {
}
// enable HTTP/2 by default
- if len(pol.ALPN) == 0 {
+ if pol.ALPN == nil {
pol.ALPN = append(pol.ALPN, defaultALPN...)
}
@@ -283,7 +283,7 @@ func (p *ConnectionPolicy) buildStandardTLSConfig(ctx caddy.Context) error {
break
}
}
- if !alpnFound {
+ if !alpnFound && (cfg.NextProtos == nil || len(cfg.NextProtos) > 0) {
cfg.NextProtos = append(cfg.NextProtos, acmez.ACMETLS1Protocol)
}