handler

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package handler a plugin to rewrite response body.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

New creates and returns a new rewrite body plugin instance.

Types

type Config

type Config struct {
	LastModified   bool                      `json:"lastModified" toml:"lastModified" yaml:"lastModified"`
	Placeholder    string                    `json:"placeholder" toml:"placeholder" yaml:"placeholder" default:"DhcnhD3khTMePgXw"`
	NonceGenerator nonceGenerator            `json:"-" toml:"-" yaml:"-"`
	LogLevel       int8                      `json:"logLevel" toml:"logLevel" yaml:"logLevel"`
	Monitoring     httputil.MonitoringConfig `json:"monitoring" toml:"monitoring" yaml:"monitoring"`
}

Config holds the plugin configuration.

Jump to

Keyboard shortcuts

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