mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-16 21:56:40 -05:00
* Check for nil ALPN; close #5470 * Apply patch * Actually I want to try this
This commit is contained in:
parent
5ebb7d496d
commit
a02ecb0f88
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue