traefik_plugin_decompress

package module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

README

Decompress Request

Plugin to decompress compressed requests in gzip

Headers:

  • gzip Flag: x-sensedia-gzip: true || false
  • Inform Content-Type: x-sensedia-content-type

Configuration

The following declaration (given here in YAML) defines a plugin:

experimental:
  plugins:
    traefik-plugin-decompress:
      moduleName: "github.com/Sensedia/traefik-plugin-decompress"
      version: "v1.0.5"

Here is an example of a file provider dynamic configuration (given here in YAML), where the interesting part is the http.middlewares section:

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
    name: my-traefik-plugin-decompress
    namespace: my-namespace
spec:
    plugin:
        traefik-plugin-decompress:
            responseHeader: "200"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error)

New creates a new DecompressMiddleware instance.

Types

type Config

type Config struct{}

Config holds the plugin configuration.

func CreateConfig

func CreateConfig() *Config

CreateConfig creates the default plugin configuration.

type DecompressMiddleware

type DecompressMiddleware struct {
	// contains filtered or unexported fields
}

DecompressMiddleware is a plugin that decompresses gzip responses.

func (*DecompressMiddleware) ServeHTTP

func (m *DecompressMiddleware) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL