This 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.