Skip to main content

Decompress

Decompress middleware decompresses HTTP request if Content-Encoding header is set to gzip.

note

The body will be decompressed in memory and consume it for the lifetime of the request (and garbage collection).

Usage

e.Use(middleware.Decompress())

Custom Configuration

Usage

e := echo.New()
e.Use(middleware.DecompressWithConfig(middleware.DecompressConfig{
Skipper: Skipper
}))

Configuration

DecompressConfig struct {
// Skipper defines a function to skip middleware.
Skipper Skipper
}

Default Configuration

DefaultDecompressConfig = DecompressConfig{
Skipper: DefaultSkipper,
}