Documentation
¶
Overview ¶
Package headers sets response headers and selects middleware by request header.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(configs ...Config) zinc.Middleware
New sets the configured response headers, then applies the first matching header route.
Types ¶
type Config ¶
type Config struct {
// Set holds response headers written before downstream handlers run.
Set map[string]string
// Routes are checked in order. The first match runs in place of the rest
// of the chain; that middleware decides whether to call Next.
Routes []Route
}
Config lists the response headers to set and the header routes to apply.
Click to show internal directories.
Click to hide internal directories.