09-02-2010 05:48 PM
I need the client-id inserted in http headers for apache logging. I have added the following to my virtual server config:
port http request-insert client-ip "X-Forwarded-For"
but it doesnt appear to be working. I read somewhere that I have to have url-switch or cookie-switch enabled for this to work. Is this true, and if so, which one should I use. I do not really need any of these features - just whatever is required to allow the header insertion to work.
This is a production environment with live traffic, so I really need to know how to do this without breaking my basic LB configuration that currently works. I saw a reference to a 'dummy url-switch' somewhere but saw no explanation or sample. Is there a way to enable this feature, to allow header insertion to work, without the url-switch actually doing anything?
09-03-2010 03:32 AM
I cannot see this command in the XL manual. However this works in a SI GT. By that fact that you can enter a port http request-insert imply this should work.
Add the following two lines to your config. TRY IN AN OUTAGE WINDOW.
HTTP header insertion causes the ServerIron to insert a header into the HTTP requests it receives on a port on a virtual server or into the HTTP responses it sends out from a port on a virtual server. The header is specified with the port http request-insert command (for HTTP requests) or the port http response-insert command (for HTTP responses).
To cause the ServerIron to insert the HTTP header specified with the port http request-insert command into requests matching rule r1, enter the following commands:
ServerIron(config)#csw-rule r1 header host exists
ServerIron(config-csw-policy1)#match r1 rewrite request-insert header
03-23-2011 10:24 PM
Tried that and got an error:
03-23-2011 10:51 PM
So, I got it working - but it broke my track-groups?
I did the following:
server virtual outside
port http url-map "u1"
port http url-switch
port http request-insert client-ip
and my headers started showing up. However, my track-group http 443 stopped working and my http/https connections started bouncing from server to server?
I removed the above configuration and the track groups started working again
Why would these affect each other?