diff options
author | Jakob Borg <jakob@kastelo.net> | 2023-08-30 09:09:50 +0200 |
---|---|---|
committer | Jakob Borg <jakob@kastelo.net> | 2023-08-30 09:09:52 +0200 |
commit | acc532fc603450a83e32562e7700a92b57cd51be (patch) | |
tree | 1c191381151c3612d79a7c88f5e0c8ea9680bac0 | |
parent | 3cc3fb750473bab5629f3551d7fe14d45269ffcd (diff) | |
download | syncthing-acc532fc603450a83e32562e7700a92b57cd51be.tar.gz syncthing-acc532fc603450a83e32562e7700a92b57cd51be.zip |
cmd/stdiscosrv: Explicitly enable HTTP/2
The server supports it, but it's not negotiated unless explicitly
allowed in the TLS config NextProtos.
-rw-r--r-- | cmd/stdiscosrv/apisrv.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/stdiscosrv/apisrv.go b/cmd/stdiscosrv/apisrv.go index 537647e1c..a30d16918 100644 --- a/cmd/stdiscosrv/apisrv.go +++ b/cmd/stdiscosrv/apisrv.go @@ -83,6 +83,7 @@ func (s *apiSrv) Serve(_ context.Context) error { Certificates: []tls.Certificate{s.cert}, ClientAuth: tls.RequestClientCert, MinVersion: tls.VersionTLS12, + NextProtos: []string{"h2", "http/1.1"}, } tlsListener, err := tls.Listen("tcp", s.addr, tlsCfg) |