Commit 84fc9018 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Disable HTTP/2 in server as it breaks server side events

parent 87d664ac
......@@ -58,8 +58,10 @@ func startServer(s *http.Server, handler http.Handler, name, addr string, port i
s.Handler = handler
var err error
if tlsConf != nil {
conf.Logger.Info(name, " TLS enabled")
s.TLSConfig = tlsConf
// Disable HTTP/2 (see package documentation of http): it breaks server side events :(
s.TLSNextProto = make(map[string]func(*http.Server, *tls.Conn, http.Handler))
conf.Logger.Info(name, " TLS enabled")
err = s.ListenAndServeTLS("", "")
} else {
err = s.ListenAndServe()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment