Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { // Source is a placeholder Source string `json:"source,omitempty"` // Destination is a new placeholder Destination string `json:"destination,omitempty"` // Default is an optional value to use if no other was found Default string `json:"default,omitempty"` // Items is an array of regex expressions and values Items []Item `json:"items,omitempty"` }
Handler is a middleware that maps a source placeholder to a destination placeholder.
The mapping process happens early in the request handling lifecycle so that the Destination placeholder is calculated and available for substitution. The Items array contains pairs of regex expressions and values, the Source is matched against the expression, if they match then the destination placeholder is set to the value.
The Default is optional, if no Item expression is matched then the value of the Default will be used.
func (Handler) CaddyModule ¶
func (Handler) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
Click to show internal directories.
Click to hide internal directories.