about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-06-24 17:20:35 +0200
committerAlan Pearce2024-06-24 17:20:35 +0200
commitaabc9bac7a291d0d7f0bf3432cb73ff7227c4444 (patch)
tree0ec9cf0c5787e07db2942fc291ba9a1c2498749b
parent50456c578497e9921558941eae59fa01bcf269bf (diff)
downloadwebsite-aabc9bac7a291d0d7f0bf3432cb73ff7227c4444.tar.lz
website-aabc9bac7a291d0d7f0bf3432cb73ff7227c4444.tar.zst
website-aabc9bac7a291d0d7f0bf3432cb73ff7227c4444.zip
log scheme directly from request
-rw-r--r--internal/server/logging.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/server/logging.go b/internal/server/logging.go
index a574bcb..611cb41 100644
--- a/internal/server/logging.go
+++ b/internal/server/logging.go
@@ -24,7 +24,7 @@ func NewLoggingResponseWriter(w http.ResponseWriter) *LoggingResponseWriter {
 
 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"
 		}