MCPcopy Index your code
hub / github.com/labstack/echo / DecompressWithConfig

Function DecompressWithConfig

middleware/decompress.go:60–62  ·  view source on GitHub ↗

DecompressWithConfig returns a decompress middleware with config or panics on invalid configuration. SECURITY: If MaxDecompressedSize is not set (zero value), it defaults to 100MB to prevent DoS attacks via zip bombs. Set to -1 to explicitly disable limits if needed for your use case.

(config DecompressConfig)

Source from the content-addressed store, hash-verified

58// SECURITY: If MaxDecompressedSize is not set (zero value), it defaults to 100MB to prevent
59// DoS attacks via zip bombs. Set to -1 to explicitly disable limits if needed for your use case.
60func DecompressWithConfig(config DecompressConfig) echo.MiddlewareFunc {
61 return toMiddlewareOrPanic(config)
62}
63
64// ToMiddleware converts DecompressConfig to middleware or returns an error for invalid configuration
65func (config DecompressConfig) ToMiddleware() (echo.MiddlewareFunc, error) {

Callers 3

DecompressFunction · 0.85
TestDecompressSkipperFunction · 0.85
TestDecompressPoolErrorFunction · 0.85

Calls 1

toMiddlewareOrPanicFunction · 0.85

Tested by 2

TestDecompressSkipperFunction · 0.68
TestDecompressPoolErrorFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…