Documentation ¶
Index ¶
Constants ¶
View Source
const ModuleName = "netlify_redirects"
Variables ¶
This section is empty.
Functions ¶
func ParseUrlWithContext ¶
func ParseUrlWithContext(urlStr string, ctx *MatchContext) (*url.URL, error)
Types ¶
type MatchContext ¶
type MatchResult ¶
type MatchResult struct { Match *urlpath.Match ResolvedTo *url.URL Source redirects.Rule IsMatched bool IsHostRedirect bool Error error }
func MatchUrlToRule ¶
func MatchUrlToRule(rule redirects.Rule, reqUrl *url.URL, ctx *MatchContext) MatchResult
type Middleware ¶
func (Middleware) CaddyModule ¶
func (Middleware) CaddyModule() caddy.ModuleInfo
func (*Middleware) Provision ¶
func (m *Middleware) Provision(ctx caddy.Context) error
func (Middleware) ServeHTTP ¶
func (m Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
Click to show internal directories.
Click to hide internal directories.