Documentation ¶
Overview ¶
Package headers provides middleware that appends headers to requests based on a set of configuration rules that define which routes receive which headers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(c middleware.Controller) (middleware.Middleware, error)
New constructs and configures a new headers middleware instance.
Types ¶
type HeaderRule ¶
HeaderRule groups a slice of HTTP headers by a URL pattern. TODO: use http.Header type instead?
type Headers ¶
type Headers struct { Next middleware.Handler Rules []HeaderRule }
Headers is middleware that adds headers to the responses for requests matching a certain path.
Click to show internal directories.
Click to hide internal directories.