fix ALPN for autocert

This commit is contained in:
Vladislav Yarmak 2023-04-03 23:24:32 +03:00
parent eaaec2fcc2
commit 2c3bd0f6c4
1 changed files with 5 additions and 1 deletions

View File

@ -173,6 +173,8 @@ func makeServerTLSConfig(certfile, keyfile, cafile, ciphers string, h2 bool) (*t
cfg.CipherSuites = makeCipherList(ciphers)
if h2 {
cfg.NextProtos = []string{"h2", "http/1.1"}
} else {
cfg.NextProtos = []string{"http/1.1"}
}
return &cfg, nil
}
@ -192,7 +194,9 @@ func updateServerTLSConfig(cfg *tls.Config, cafile, ciphers string, h2 bool) (*t
}
cfg.CipherSuites = makeCipherList(ciphers)
if h2 {
cfg.NextProtos = []string{"h2", "http/1.1"}
cfg.NextProtos = []string{"h2", "http/1.1", "acme-tls/1"}
} else {
cfg.NextProtos = []string{"http/1.1", "acme-tls/1"}
}
return cfg, nil
}