Response Transformer rule
Rule requirements
This rule only applies to external endpoints.
Rule execution order
Transformation of response headers runs after the response is received from the external endpoint. This rule runs with the Response Mapper.
The Response Mapper and Response Transformer rules support the request and response functions in the APIM Expression Language. These functions enable you to modify the headers for your Proxy endpoints quickly. When you click to enable the expression dropdown, you can access these functions.
Settings
Field | Description |
---|---|
When this rule should be applied | An expression that defines one or more conditions that must be
true for the rule to execute.
Example: The expression |
Headers to Add/Replace |
The list of headers to add or replace into the response. If the name or value of an entry in the table is blank, no changes are made. |
Name | The name for the header to add or replace. Example:
|
Value |
The value for the header. If this field is an expression, it can return a list to simulate the header being repeated multiple times in the original response. If the header in the original response was repeated multiple times, this new value replaces all of the original values. If the original values need to be preserved, this field should be an expression that gets the original value and returns a modified version. Example: nosniff |
Headers to Remove |
The list of headers to remove from the response. The subfield Name functions the same way it does for Headers to Add/Replace. Example: x-content-age |