Dynamic forwarding component
The dynamic forwarding component extracts the target host and port from HTTP request content and forwards requests directly to the extracted address. Use this component to route requests to dynamically determined endpoints without pre-registering backend servers, by extracting destination information from the query string or request headers.
The dynamic forwarding component must be used with an IP Address range server group, which defines the allowed target IP addresses and port ranges for forwarding.
Function type
Route scheduling
Field description
ComponentConfig
Parameter | Type | Required | Default | Description |
RequestRules | No | - | A list of target address extraction rules. A maximum of five rules are supported. Rules are matched in the order they appear in the list, and the first matched rule takes effect. |
RequestRuleItem
Parameter | Type | Required | Default | Description |
ExtractFrom | Yes | - | The source from which the target host and port are extracted. | |
ExtractType | Yes | - | The extraction mode for the target host and port. | |
TargetKey | String | Conditionally required | - | The key name in Combined mode. The value format is host:port. This parameter is required when ExtractType is set to Combined. |
TargetHostKey | String | Conditionally required | - | The key name for the target host in Separated mode. This parameter is required when ExtractType is set to Separated. |
TargetPortKey | String | Conditionally required | - | The key name for the target port in Separated mode. This parameter is required when ExtractType is set to Separated. |
DefaultPort | Integer | No | - | The fallback port used when no port is extracted by the rule. Valid values: |
ExtractFromEnum
Value | Description |
QueryString | Extracts the target host and port from the query string. |
Header | Extracts the target host and port from request headers. |
ExtractTypeEnum
Value | Description |
Combined | The target host and port are in the same key. The value format is host:port. |
Separated | The target host and port are in two separate keys. |
Error codes
HTTP status code | Error message | Description |
403 | endpoint not provided | The request does not contain an extractable target address. The dynamic forwarding component cannot determine the forwarding target. |
403 | endpoint not allowed | The extracted target IP address or port is not within the allowed range of the IP Address range server group. |