all repos — website @ 8df549bdce3a3fc0e3674768c2e75002673c987d

My website

don't log URL scheme
Alan Pearce alan@alanpearce.eu
Tue, 25 Jun 2024 06:53:39 +0200
commit

8df549bdce3a3fc0e3674768c2e75002673c987d

parent

e4a9203bc0af96c29b40b53d32b20aefb6940e35

1 files changed, 0 insertions(+), 5 deletions(-)

jump to
M internal/server/logging.gointernal/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,