We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e47330a commit 3b3443eCopy full SHA for 3b3443e
1 file changed
main.go
@@ -909,10 +909,16 @@ func makeServerTLSConfig(args *CLIArgs) (*tls.Config, error) {
909
if err != nil {
910
return nil, err
911
}
912
- if !args.disableHTTP2 {
913
- cfg.NextProtos = []string{"h2", "http/1.1"}
914
- } else {
915
- cfg.NextProtos = []string{"http/1.1"}
+ if args.tlsALPNEnabled {
+ if len(args.tlsALPNProtos.values) == 0 {
+ if !args.disableHTTP2 {
+ cfg.NextProtos = []string{"h2", "http/1.1"}
916
+ } else {
917
+ cfg.NextProtos = []string{"http/1.1"}
918
+ }
919
920
+ cfg.NextProtos = args.tlsALPNProtos.values
921
922
923
return &cfg, nil
924
0 commit comments