Documentation ¶
Overview ¶
Package headerhasher is a traefik middleware that looks for a specified input header and attaches its sha256 hash as a new header.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { InputHeader string `json:"inputHeader,omitempty"` OutputHeader string `json:"outputHeader,omitempty"` }
Config holds the plugin configuration.
func CreateConfig ¶
func CreateConfig() *Config
CreateConfig creates the default plugin configuration.
type HeaderHasher ¶
type HeaderHasher struct {
// contains filtered or unexported fields
}
HeaderHasher represents the plugin which looks for a header named `inputHeader` and if found calculates sha256 of its value and attaches it as `outputHeader`.
func (*HeaderHasher) ServeHTTP ¶
func (a *HeaderHasher) ServeHTTP(rw http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.