all repos — website @ aabc9bac7a291d0d7f0bf3432cb73ff7227c4444

My website

log scheme directly from request
Alan Pearce alan@alanpearce.eu
Mon, 24 Jun 2024 17:20:35 +0200
commit

aabc9bac7a291d0d7f0bf3432cb73ff7227c4444

parent

50456c578497e9921558941eae59fa01bcf269bf

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

jump to
M internal/server/logging.gointernal/server/logging.go
@@ -24,7 +24,7 @@ } 
 func wrapHandlerWithLogging(wrappedHandler http.Handler) http.Handler {
 	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		scheme := r.Header.Get("X-Forwarded-Proto")
+		scheme := r.URL.Scheme
 		if scheme == "" {
 			scheme = "http"
 		}