Forum Discussion
rohitbarolia_28
Nimbostratus
May 03, 2017Rule to log browser info.
I am looking for a rule to log browser info (type and version) on one of the https VIP (standard VIP).
P_K
Altostratus
May 03, 2017This should work! Apply this to your virtual server along with any other irules.
This iRule will log user-agent, client IP, host, requested uri, Xff, content-lenth, keep-alive, authorization(if any), etc..
when HTTP_REQUEST {
set LogStr "Client [IP::client_addr]:[TCP::client_port] -> [HTTP::host][HTTP::uri]"
log local0. ""
log local0. "$LogStr (request)"
foreach aHeader [HTTP::header names] {
log local0. "$aHeader: [HTTP::header value $aHeader]"
}
log local0. ""
}
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