Forum Discussion

M_2's avatar
M_2
Icon for Altocumulus rankAltocumulus
Mar 31, 2015

Irule : Need help

Hello Friends,

 

Can we write an irule to check for a specific string say "xyz", from the client request , in any header it may be .

 

I need to check for all the headers that a client passes on.

 

Sam.

 

1 Reply

  • If you want to loop through and check the headers, you could do something like this:

    foreach name [HTTP::header names] {
        if { [string tolower [HTTP::header value $name]] contains "xyz" } {
             Do something
            local0. "$name: [HTTP::header value $name]"
        }
    }