Note : The above method removes only the specified headers from the response. If there is a need to remove all the headers, please follow the instructions below.
In <APIM_HOME>/repository/deployment/server/synapse-configs/default/sequences/main.xml file, add the below property just after the beginning of <out> sequence opening tag.
In <APIM_HOME>/repository/deployment/server/synapse-configs/default/sequences/fault.xml file, add the below property just after the <send/> closing tag<send> mediator.