Remove Headers
Overview
The Remove Headers policy action enables the removal of headers to both inbound and outbound traffic.
Example
Use this action config in your Traffic Policy
- YAML
- JSON
# snippet
---
actions:
- type: "remove-headers"
config:
headers:
- "is-ngrok"
- "internal-trace-id"
// snippet
{
"actions": [
{
"type": "remove-headers",
"config": {
"headers": [
"is-ngrok",
"internal-trace-id"
]
}
}
]
}
Behavior
When executed as an inbound policy, this action will remove headers on an incoming http request before reaching the upstream server with the configured headers. When executed as an outbound policy, the configured headers are removed to the response from the upstream server.
Reference
Supported Directions
- Inbound
- Outbound
Configuration
Type |
---|
remove-headers |
Parameter | Description | |
---|---|---|
headers | Array<string> | Headers to be removed from the request or response. |