MCPcopy
hub / github.com/labstack/echo / BodyDump

Function BodyDump

middleware/body_dump.go:58–60  ·  view source on GitHub ↗

BodyDump returns a BodyDump middleware. BodyDump middleware captures the request and response payload and calls the registered handler. SECURITY: By default, this limits dumped bodies to 5MB to prevent memory exhaustion attacks. To customize limits, use BodyDumpWithConfig. To disable limits (not r

(handler BodyDumpHandler)

Source from the content-addressed store, hash-verified

56// attacks. To customize limits, use BodyDumpWithConfig. To disable limits (not recommended
57// in production), explicitly set MaxRequestBytes and MaxResponseBytes to -1.
58func BodyDump(handler BodyDumpHandler) echo.MiddlewareFunc {
59 return BodyDumpWithConfig(BodyDumpConfig{Handler: handler})
60}
61
62// BodyDumpWithConfig returns a BodyDump middleware with config.
63// See: `BodyDump()`.

Callers 2

TestBodyDump_panicFunction · 0.85
TestBodyDump_ReadErrorFunction · 0.85

Calls 1

BodyDumpWithConfigFunction · 0.85

Tested by 2

TestBodyDump_panicFunction · 0.68
TestBodyDump_ReadErrorFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…