rewrite

package
v2.0.0-beta9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2019 License: Apache-2.0 Imports: 9 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rewrite

type Rewrite struct {
	Method string `json:"method,omitempty"`
	URI    string `json:"uri,omitempty"`

	StripPathPrefix string `json:"strip_path_prefix,omitempty"`
	StripPathSuffix string `json:"strip_path_suffix,omitempty"`

	HTTPRedirect caddyhttp.WeakString `json:"http_redirect,omitempty"`
	Rehandle     bool                 `json:"rehandle,omitempty"`
	// contains filtered or unexported fields
}

Rewrite is a middleware which can rewrite HTTP requests.

func (Rewrite) CaddyModule

func (Rewrite) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Rewrite) Provision

func (rewr *Rewrite) Provision(ctx caddy.Context) error

Provision sets up rewr.

func (Rewrite) ServeHTTP

func (rewr Rewrite) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error

func (Rewrite) Validate

func (rewr Rewrite) Validate() error

Validate ensures rewr's configuration is valid.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL