summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2024-05-10 15:51:28 -0600
committerMatthew Holt <[email protected]>2024-05-10 15:51:28 -0600
commit399186abfce674ceccb7c9197fa11158d101f485 (patch)
tree085b39fb21d06514d62e8d6abbb11ee19ddc7e2b /modules
parent6dce4934f0ba3bbf4e69273faf6d00db8f4c2852 (diff)
downloadcaddy-399186abfce674ceccb7c9197fa11158d101f485.tar.gz
caddy-399186abfce674ceccb7c9197fa11158d101f485.zip
Second half of 6dce493
Not sure how it got unstaged
Diffstat (limited to 'modules')
-rw-r--r--modules/caddyhttp/server.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go
index 5c7bd8936..a931266ee 100644
--- a/modules/caddyhttp/server.go
+++ b/modules/caddyhttp/server.go
@@ -787,8 +787,11 @@ func (s *Server) logRequest(
if wrec.Status() >= 400 {
logAtLevel = logger.Error
}
-
- logAtLevel("handled request", fields...)
+ message := "handled request"
+ if nop, ok := GetVar(r.Context(), "unhandled").(bool); ok && nop {
+ message = "NOP"
+ }
+ logAtLevel(message, fields...)
}
}