Forum Discussion
John_Shin_10665
Nimbostratus
Aug 15, 2007x-header information logging
with [HTTP::header "target"] I am able to get the basic stuff like User-Agent. Is there separate command to grab x-header information for logging purpose?
- hoolio
Cirrostratus
You can iterate through the header names and look for a header name that starts with x- and then log the header name and value.when HTTP_REQUEST { initializes a variable to store the headers set headers loop through the header names foreach aHeader [HTTP::header names] { check if this header starts with x- if {[string tolower $aHeader] starts_with "x-"}{ add the header name and value to the headers variable set headers "$headers; $aHeader: [HTTP::header value $aHeader]" } } if {$headers}{ log local0. "client: [IP::client_addr]; x- headers: $headers" } }
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