about summary refs log tree commit diff stats
path: root/internal/server
diff options
context:
space:
mode:
authorAlan Pearce2024-05-25 18:10:06 +0200
committerAlan Pearce2024-05-25 18:10:06 +0200
commitb65fdaad764314991f502f3702b904a11f0fe6e7 (patch)
tree8db83c1cd7c2e5689433698e99bf897e6b25afc3 /internal/server
parentfb07320a12f83ffaf80bf3c0aca94a720f865201 (diff)
downloadsearchix-b65fdaad764314991f502f3702b904a11f0fe6e7.tar.lz
searchix-b65fdaad764314991f502f3702b904a11f0fe6e7.tar.zst
searchix-b65fdaad764314991f502f3702b904a11f0fe6e7.zip
refactor: don't log request Host, it's irrelevant to this server
Diffstat (limited to 'internal/server')
-rw-r--r--internal/server/logging.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/internal/server/logging.go b/internal/server/logging.go
index bbe9469..372972f 100644
--- a/internal/server/logging.go
+++ b/internal/server/logging.go
@@ -51,20 +51,15 @@ func wrapHandlerWithLogging(wrappedHandler http.Handler, opts wrappedHandlerOpti
 		if scheme == "" {
 			scheme = "http"
 		}
-		host := r.Host
-		if host == "" {
-			host = opts.defaultHostname
-		}
 		lw := NewLoggingResponseWriter(w)
 		wrappedHandler.ServeHTTP(lw, r)
 		statusCode := lw.statusCode
 		fmt.Fprintf(
 			opts.logger,
-			"%s %s %d %s %s %s\n",
+			"%s %s %d %s %s\n",
 			scheme,
 			r.Method,
 			statusCode,
-			host,
 			r.URL.Path,
 			lw.Header().Get("Location"),
 		)