Forum Discussion
Jon_46219
Nimbostratus
May 06, 2010Cath error and print virtual server
I have an Irule where I execute: "HTTP::header insert X-Forwarded-For..." and sometimes I get an error.
I have this irule applied in serveral virtual servers so I don't know in which one is ...
Michael_Yates
Nimbostratus
May 06, 2010This would be the closest I can think of without writing a custom iRule for each Virtual Server.
This will give you the Host / URL that caused the iRule to be executed:
when HTTP_REQUEST {
HTTP::header insert X-Forwarder-For [IP::client_addr]
log local0. "X-Forwarded for: [HTTP::host]"
}
If you wanted to do this for something that is highly specific for each Virtual Server you could do this:
when HTTP_REQUEST {
HTTP::header insert X-Forwarder-For [IP::client_addr]
log local0. "X-Forwarded for: My Virutal Server Name"
}
You can also do X-Forwarder Inserts with an HTTP Profile instead of an iRule if that is something that interests you.
Create a Custom HTTP Profile based on the default and set these options:
Request Header Insert - X-Forwarded-For:true
Insert XForwarded For - Enabled
We actually set the "Maximum Header Size" option as well.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
