redirect
Summary
Redirects specify how URLs may need to be rewritten. Each Redirect has a name, a regex that matches the requested URL, a to indicating how the url should be rewritten, and a flag to indicate how the redirect will be handled by the proxying layer.
Example object
{
"name": "force-https",
"from": "(.*)",
"to": "https://$1",
"redirect_type": "permanent"
}Fields
name
nameCommon name for this redirect, e.g. "force-https".
from
fromRegex pattern to match against incoming request URLs. Capture groups set here can be used in the to field.
to
toNew URL of the redirect. Can be direct string ("https://localhost:443) or reference capture groups from the from field ("https://localhost:$1").
redirect_type
redirect_typeOne of "permanent" or "temporary". Selection "permanent" will set the response code to 301, "temporary" will be 302.
header_constraints
header_constraintsArray of Header Constraints that must match for the redirect to take effect.
Last updated
Was this helpful?