Redirect or rewrite requests to a different URL.

Hierarchy

  • Url

Properties

follow_redirects?: boolean

Determines whether requests may be redirected to the hostname defined in the Location header returned by an origin server.

url_redirect?: {
    code?: HttpStatusCode;
    destination?: string;
    source?: string;
    syntax?: "regexp" | "path-to-regexp";
}

Redirects requests according to the Location header.

Type declaration

  • Optional code?: HttpStatusCode
  • Optional destination?: string

    A replacement pattern for the URL to which the requests identified in the source property will be redirected.

  • Optional source?: string

    A regular expression that identifies the requests that will be redirected by their relative path. This relative path starts directly after the hostname.

  • Optional syntax?: "regexp" | "path-to-regexp"

    Determines whether the source property is a relative path that supports named parameters (e.g., :productId) or a regular expression.

url_rewrite?: {
    destination?: string;
    source?: string;
    syntax?: "regexp" | "path-to-regexp";
}[]

Rewrites the request URL.

Generated using TypeDoc