diff --git a/server/server.go b/server/server.go index 9d79382..2e4a9d7 100644 --- a/server/server.go +++ b/server/server.go @@ -64,7 +64,10 @@ func ListenAndServe(ctx context.Context, httpsPort, httpPort int, handler http.H } tlsServer := http.Server{ - Handler: handler, + Handler: handler, + BaseContext: func(listener net.Listener) context.Context { + return ctx + }, ErrorLog: errorLog, } @@ -86,6 +89,9 @@ func ListenAndServe(ctx context.Context, httpsPort, httpPort int, handler http.H Addr: fmt.Sprintf("%s:%d", opts.BindHost, httpPort), Handler: handler, ErrorLog: errorLog, + BaseContext: func(listener net.Listener) context.Context { + return ctx + }, } go func() { logrus.Infof("Listening on %s:%d", opts.BindHost, httpPort)