remove-headers
Removes headers from the request before your service sees it, or from the response before the visitor does.
| Phases | on_http_requeston_http_response |
| Terminating | No — the next action runs after it. |
| Cost | 1 Traffic Policy unit per run · not on the Free plan |
Example
policy.yaml
on_http_response:
- name: HideServerHeaders
actions:
- type: remove-headers
config:
headers: [server, x-powered-by]
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 |
|---|---|---|
headers required | list of strings | 1 to 10 header names to remove. |
Behaviour
- Useful for stripping internal headers your framework adds, or credentials a client should never forward.
Other actions
add-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 forward-internal