Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Replacement ¶
type Replacement struct { // A substring to search for. Mutually exclusive with search_regexp. Search string `json:"search,omitempty"` // A regular expression to search for. Mutually exclusive with search. SearchRegexp string `json:"search_regexp,omitempty"` // The replacement string/value. Required. Replace string `json:"replace"` // contains filtered or unexported fields }
Replacement is either a substring or regular expression replacement to perform; precisely one must be specified, not both.
type Shooter ¶
type Shooter struct { // The list of replacements to make on the response body. Replacements []*Replacement `json:"replacements,omitempty"` // If true, perform replacements in a streaming fashion. // This is more memory-efficient but can remove the // Content-Length header since knowing the correct length // is impossible without buffering, and getting it wrong // can break HTTP/2 streams. Stream bool `json:"stream,omitempty"` // contains filtered or unexported fields }
func (Shooter) CaddyModule ¶
func (Shooter) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*Shooter) UnmarshalCaddyfile ¶
UnmarshalCaddyfile implements caddyfile.Unmarshaler. Syntax:
replace [stream | [re] <search> <replace>] { stream [re] <search> <replace> }
If 're' is specified, the search string will be treated as a regular expression. If 'stream' is specified, the replacement will happen without buffering the whole response body; this might remove the Content-Length header.
Click to show internal directories.
Click to hide internal directories.