Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestrictPrefix ¶
type RestrictPrefix struct { Prefix string `json:"prefix,omitempty"` // contains filtered or unexported fields }
RestrictPrefix is middleware that restricts requests where any portion of the URI matches a given prefix.
func (RestrictPrefix) CaddyModule ¶
func (RestrictPrefix) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*RestrictPrefix) Provision ¶
func (p *RestrictPrefix) Provision(ctx caddy.Context) error
Provision a Zap logger to RestrictPrefix.
func (RestrictPrefix) ServeHTTP ¶
func (p RestrictPrefix) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
ServeHTTP implements the caddyhttp.MiddlewareHandler interface.
func (*RestrictPrefix) Validate ¶
func (p *RestrictPrefix) Validate() error
Validate the prefix from the module's configuration, setting the default prefix "." if necessary.
Click to show internal directories.
Click to hide internal directories.