forward-internal
Hands the request to one of your internal endpoints (*.internal), which runs its own policy and forwards to its agent.
| Phases | on_http_request |
| Terminating | Yes — once it answers, nothing after it runs. |
| Cost | Free |
Example
policy.yaml
on_http_request:
- name: Api
expressions:
- "req.url.path.startsWith('/api')"
actions:
- type: forward-internal
config:
url: https://api.example.internal
- name: Web
actions:
- type: forward-internal
config:
url: https://web.example.internal
Start an agent endpoint with it: devgate http 8080 --traffic-policy-file policy.yaml, or paste it into a
reserved or cloud endpoint’s Traffic Policy tab in the dashboard.
Configuration
| Field | Type | Description |
|---|---|---|
url required | string | The internal endpoint, e.g. https://api.example.internal. May use ${…}. |
binding | string | Only internal is supported. Default: internal. |
on_error | string | halt answers 502 when the target is offline; continue moves on to the next action instead. Default: halt. |
Behaviour
- Only internal endpoints of the same account are reachable.
- The internal endpoint’s own on_http_request runs next, and its on_http_response runs before this endpoint’s.
- Forwarding chains stop after 5 hops, so two endpoints forwarding to each other can’t loop.
Other actions
add-headers remove-headers compress-response basic-auth oauth openid-connect jwt-validation custom-response deny redirect url-rewrite restrict-ips rate-limit circuit-breaker verify-webhook http-request set-vars log close-connection