app/vmauth: wrap readDurationTrackingBody if r.Body != nil

This commit is contained in:
Max Kotliar
2026-01-15 18:04:14 +02:00
parent c7cc0a0332
commit 94218bd4dd

View File

@@ -156,7 +156,9 @@ func requestHandlerWithInternalRoutes(w http.ResponseWriter, r *http.Request) bo
}
func requestHandler(w http.ResponseWriter, r *http.Request) bool {
r.Body = &readDurationTrackingBody{r: r.Body}
if r.Body != nil {
r.Body = &readDurationTrackingBody{r: r.Body}
}
ats := getAuthTokensFromRequest(r)
if len(ats) == 0 {