diff options
author | Alan Pearce | 2024-06-24 17:20:35 +0200 |
---|---|---|
committer | Alan Pearce | 2024-06-24 17:20:35 +0200 |
commit | aabc9bac7a291d0d7f0bf3432cb73ff7227c4444 (patch) | |
tree | 0ec9cf0c5787e07db2942fc291ba9a1c2498749b /internal/server | |
parent | 50456c578497e9921558941eae59fa01bcf269bf (diff) | |
download | website-aabc9bac7a291d0d7f0bf3432cb73ff7227c4444.tar.lz website-aabc9bac7a291d0d7f0bf3432cb73ff7227c4444.tar.zst website-aabc9bac7a291d0d7f0bf3432cb73ff7227c4444.zip |
log scheme directly from request
Diffstat (limited to 'internal/server')
-rw-r--r-- | internal/server/logging.go | 2 |
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" } |