Remove Request Headers
Ambassador Edge Stack can remove a list of HTTP headers that would be sent to the upstream from the request.
The remove_request_headers Attribute
The remove_request_headers attribute takes a list of keys used to match to the header.
remove_request_headers can be set either in a Mapping or using ambassador Module defaults.
Mapping Example
---apiVersion: getambassador.io/v2kind: Mappingmetadata:name: quote-backendspec:prefix: /backend/remove_request_headers:- authorizationservice: quote
will drop the header with key authorization.
apiVersion: getambassador.io/v2kind: Modulemetadata:name: ambassadorspec:config:defaults:httpmapping:remove_request_headers:- authorization---apiVersion: getambassador.io/v2kind: Mappingmetadata:name: quote-backend1spec:prefix: /backend1/service: quote---apiVersion: getambassador.io/v2kind: Mappingmetadata:name: quote-backend2spec:prefix: /backend2/service: quote
This is the same as the mapping example, but the headers will be removed for both mappings.
Questions?
We’re here to help. If you have questions, join our Slack or contact us.