don't log URL scheme
Alan Pearce alan@alanpearce.eu
Tue, 25 Jun 2024 06:53:39 +0200
1 files changed, 0 insertions(+), 5 deletions(-)
jump to
M internal/server/logging.go → internal/server/logging.go
@@ -24,10 +24,6 @@ } func wrapHandlerWithLogging(wrappedHandler http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - scheme := r.URL.Scheme - if scheme == "" { - scheme = "http" - } host := r.Host lw := NewLoggingResponseWriter(w) wrappedHandler.ServeHTTP(lw, r) @@ -37,7 +33,6 @@ } statusCode := lw.statusCode log.Info( "http request", - "scheme", scheme, "method", r.Method, "status", statusCode, "host", host,