diff options
Diffstat (limited to 'internal/server/logging.go')
-rw-r--r-- | internal/server/logging.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/internal/server/logging.go b/internal/server/logging.go index afcce6d..d70d927 100644 --- a/internal/server/logging.go +++ b/internal/server/logging.go @@ -22,20 +22,13 @@ func NewLoggingResponseWriter(w http.ResponseWriter) *LoggingResponseWriter { return &LoggingResponseWriter{w, http.StatusOK} } -type wrappedHandlerOptions struct { - defaultHostname string -} - -func wrapHandlerWithLogging(wrappedHandler http.Handler, opts wrappedHandlerOptions) http.Handler { +func wrapHandlerWithLogging(wrappedHandler http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { scheme := r.Header.Get("X-Forwarded-Proto") if scheme == "" { scheme = "http" } host := r.Host - if host == "" { - host = opts.defaultHostname - } lw := NewLoggingResponseWriter(w) wrappedHandler.ServeHTTP(lw, r) statusCode := lw.statusCode |