Forum Discussion
Yugandhar
Nimbostratus
Mar 07, 2019iRule to Collect the HTTP Header Values into an Array.
Hi,
Can we have an iRule to collect all the HTTP Header values in an array and send that info to a remote log server.
when HTTP_REQUEST {
foreach RequestHeader [HTTP::header names] {
set Req...
PeteWhite
Employee
Mar 07, 2019when HTTP_REQUEST {
set logEntry ""
foreach headerName [HTTP::header names] {
append logEntry "$headerName:[HTTP::header value $headerName]"
}
log local0 10.10.10.10 "$LogEntry
}
How about this? It doesn't actually create an array but it prints out the header names and values which seems to be what you want. You may find that the log entry is too large.
There are arrays in tcl but they are not very easy to use. You can use lists 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
