mirror of https://github.com/caddyserver/caddy.git
* Check for nil ALPN; close #5470 * Apply patch * Actually I want to try this
This commit is contained in:
parent
5ebb7d496d
commit
a02ecb0f88
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue