From a2e633b0389f306056e1b0d46e4d914f9db72197 Mon Sep 17 00:00:00 2001 From: Equim Date: Fri, 14 Jun 2019 23:03:03 +0800 Subject: [PATCH] add http/1.1 ALPN --- h2s.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/h2s.go b/h2s.go index 5ca7df9..0a764ad 100644 --- a/h2s.go +++ b/h2s.go @@ -163,7 +163,9 @@ func NewServer(c *Config) (*Server, error) { tlsConfig := (*tls.Config)(nil) if t := v.TLSConfig; t != nil { - tlsConfig = new(tls.Config) + tlsConfig = &tls.Config{ + NextProtos: []string{"http/1.1"}, + } if t.ServerName != "" { tlsConfig.ServerName = t.ServerName