Preserving HTTP headers are important when executing backend services via applications/middleware. This is because most of the time certain important headers are removed or modified by the applications/middleware which run the communication.The previous version of our WSO2 ESB, version 4.8.1, only supported “server” and “user agent” header fields to preserve with, but with the new ESB 4.9.0, we’ve introduced a new new property (http.headers.preserve) for the passthru (repository/conf/passthru-http.properties) and Nhttp(repository/conf/nhttp.properties) transporters to preserve more HTTP headers.
Passthru transporter – support header fields
Nhttp transport – support headers
You can specify header fields which should be preserved in a comma-separated list, as shown below.
http.headers.preserve = Location, Date, Server
Note that properties(http.user.agent.preserve, http.server.preserve), which were used in ESB 4.8.1 for preserving headers, also works in ESB 4.9.0 - we’ve kept that for the backward compatibility.