apachehttp-headerswebsphereibmhttpserver

How to modify the response header based on the content of response body in IBM http server?


I have a scenario in which the IHS server is used as a reverse proxy. Any request from the browser reaches the webserver (ie IHS) and IHS redirects the request to the corresponding URL. Similarly the response will return back to IHS and then to the browser. Now I need to include the user ID in the response header. This user ID which I need to include in the header needs to be obtained from the body of the response.

Please help if this is possible as I am new to IHS.


Solution

  • You can't do this in an Apache-based proxy server. Headers are sent before the body, and the body is not buffered and scanned for content in any standard Apache module.

    If you need to set a response header to the logged in user, do it in your application.