apigeelint
Version:
Node module and tool to lint a bundle for an Apigee API Proxy or sharedflow.
14 lines (13 loc) • 445 B
text/xml
<Javascript name="JS-RemoveCopiedHeaders" enabled='true'>
<!--
This policy removes the request headers that Apigee
implicitly copies to the response, on a oopback proxy.
-->
<Source>
var names = String(context.getVariable('request.headers.names'));
names = names.substring(1, names.length-1);
names.split(',').forEach(function(name) {
context.removeVariable('response.header.' + name.trim());
});
</Source>
</Javascript>