Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace RedirectRule

An object that represents the action of returning a specified response code and a redirect URI. Each RedirectRule object is configured for a particular listener and a designated path.

The default response code is {@code 302 Found}.

*NOTES:** * This rule applies only to HTTP listeners. * You can specify this rule only with the {@link #ruleCondition(RuleConditionRequest) ruleCondition} type {@code PATH}. * A listener can have only one RedirectRule object for a given original path. The {@link #pathMatchCondition(PathMatchConditionRequest) pathMatchCondition} {@code attributeValue} specifies the original path.

Properties

Const action

action: string = "REDIRECT"

conditions

conditions: Array<RuleCondition>

Optional redirectUri

redirectUri: model.RedirectUri

Optional responseCode

responseCode: undefined | number

The HTTP status code to return when the incoming request is redirected.

The status line returned with the code is mapped from the standard HTTP specification. Valid response codes for redirection are:

301 * 302 * 303 * 307 * 308

The default value is {@code 302} (Found).

Example: {@code 301} Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.

Methods

getDeserializedJsonObj

  • getDeserializedJsonObj(obj: Rule): object

getJsonObj

  • getJsonObj(obj: Rule): object