2. Description and use case
Anypoint Platform for APIs supports several policies for
injecting or removing HTTP headers from a request or
response. The policies take effect before sending the
request or response. The add response header policy injects
one or more headers into a response from the backend
service to the client, or overrides the header value in a
response from the backend service.
3. How to use it
- Download the policy using Anypoint Exchange
- Upload it to Anypoint Platform, as a Custom Policy
- Go to the policies section and choose the policy
- Add as many headers as you want. Keep in mind that you
can use Wildcards in the value section.
- Apply the policy.
- Now you are able to test it!
4. The policy editor
By pressing the “+” button, you will be able to add a new
header.
6. Show me the code
<after>
<mule:set-property propertyName="
customResponseHeader" value="
customResponseValue"/>
</after>
Each set-property adds/overrides a header.