RoutingRule
Defined in: src/policies/traffic/dynamic-routing.ts:15
Configuration for the dynamicRouting policy.
Properties
Section titled “Properties”condition()
Section titled “condition()”condition: (
c) =>boolean|Promise<boolean>
Defined in: src/policies/traffic/dynamic-routing.ts:19
Condition that determines if this rule applies.
Parameters
Section titled “Parameters”Context
Returns
Section titled “Returns”boolean | Promise<boolean>
headers?
Section titled “headers?”
optionalheaders:Record<string,string>
Defined in: src/policies/traffic/dynamic-routing.ts:25
Optional headers to add to the upstream request.
optionalname:string
Defined in: src/policies/traffic/dynamic-routing.ts:17
Human-readable rule name for debugging.
rewritePath()?
Section titled “rewritePath()?”
optionalrewritePath: (path) =>string
Defined in: src/policies/traffic/dynamic-routing.ts:23
Optional path rewrite function.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
target
Section titled “target”target:
string
Defined in: src/policies/traffic/dynamic-routing.ts:21
Target upstream URL to route to.