diff options
author | Vladimir Shushlin <v.shushlin@gmail.com> | 2022-02-22 12:42:43 +0300 |
---|---|---|
committer | Vladimir Shushlin <v.shushlin@gmail.com> | 2022-02-22 13:02:58 +0300 |
commit | dec4b09ac1f6fdf98487d4db61055c1e64358c15 (patch) | |
tree | 27b23651249094f96157d247353be08629f04e27 /server.go | |
parent | 58581c5a2ff3e95e1dc3acc69913412477a37557 (diff) |
refactor: review fixes
Diffstat (limited to 'server.go')
-rw-r--r-- | server.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -4,11 +4,13 @@ import ( "context" "crypto/tls" "fmt" + stdlog "log" "net" "net/http" "time" - proxyproto "github.com/pires/go-proxyproto" + "github.com/pires/go-proxyproto" + "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/labkit/log" "gitlab.com/gitlab-org/gitlab-pages/internal/netutil" @@ -31,6 +33,7 @@ func (a *theApp) listenAndServe(server *http.Server, addr string, h http.Handler server.Handler = h server.TLSConfig = config.tlsConfig + server.ErrorLog = stdlog.New(logrus.StandardLogger().Writer(), "", 0) // ensure http2 is enabled even if TLSConfig is not null // See https://github.com/golang/go/blob/97cee43c93cfccded197cd281f0a5885cdb605b4/src/net/http/server.go#L2947-L2954 if server.TLSConfig != nil { |