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

Function BodyDumpWithConfig

middleware/body_dump.go:68–70  ·  view source on GitHub ↗

BodyDumpWithConfig returns a BodyDump middleware with config. See: `BodyDump()`. SECURITY: If MaxRequestBytes and MaxResponseBytes are not set (zero values), they default to 5MB each to prevent DoS attacks via large payloads. Set them explicitly to -1 to disable limits if needed for your use case.

(config BodyDumpConfig)

Source from the content-addressed store, hash-verified

66// to 5MB each to prevent DoS attacks via large payloads. Set them explicitly to -1 to disable
67// limits if needed for your use case.
68func BodyDumpWithConfig(config BodyDumpConfig) echo.MiddlewareFunc {
69 return toMiddlewareOrPanic(config)
70}
71
72// ToMiddleware converts BodyDumpConfig to middleware or returns an error for invalid configuration
73func (config BodyDumpConfig) ToMiddleware() (echo.MiddlewareFunc, error) {

Callers 2

BodyDumpFunction · 0.85

Calls 1

toMiddlewareOrPanicFunction · 0.85

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…