app: throw away not found body (#2566)

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby 2025-05-04 23:06:44 +03:00 committed by GitHub
parent 9a86ffc102
commit 1dddd3e93b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1029,13 +1029,10 @@ func notFoundHandler(
writer http.ResponseWriter, writer http.ResponseWriter,
req *http.Request, req *http.Request,
) { ) {
body, _ := io.ReadAll(req.Body)
log.Trace(). log.Trace().
Interface("header", req.Header). Interface("header", req.Header).
Interface("proto", req.Proto). Interface("proto", req.Proto).
Interface("url", req.URL). Interface("url", req.URL).
Bytes("body", body).
Msg("Request did not match") Msg("Request did not match")
writer.WriteHeader(http.StatusNotFound) writer.WriteHeader(http.StatusNotFound)
} }