How to proceed if I need to access request body from custom Middleware


I need to write a custom middleware that needs to inspect the request body (as a sort of preemptive global validator).

The problem is that once I read the body of a request (via c.Request().Body) then the body is no longer available to the rest of the frameworks components (duh, since it’s a Closer).

Is there a way to be able to process the body non-distructively?