Forum Discussion

Wes_98712's avatar
Icon for Nimbostratus rankNimbostratus
Nov 08, 2011

Header Inserts

I am experiencing a somewhat odd situation. I created an HTTP profile and setup a name value pair in the Request Header Insert (SSL_ENV:On). When I debug in Fiddler to see if the header is inserted, I don't see anything which is really strange. So I went the iRule route and tried to test if the header was set and if it wasn't set it to On:





set myhost [HTTP::host]


set myuri [HTTP::uri]


if { ![HTTP::header "SSL_ENV"] equals "On" } {


HTTP::header insert SSL_ENV On


log local0. "HEADER HTTPVS: [HTTP::header "SSL_ENV"]"


} else {


if { $myuri starts_with "/API" } {


log local0. "URL: $myuri going to non_ssl pool"


pool pool_one_80


} else {


HTTP::redirect "https://$myhost$myuri"









It throws a strange error on the ![HTTP::header



[undefined procedure: !HTTP::header] [!HTTP::header "SSL_ON"]



I thought inserting a header would be really straight forward and easy, but somehow I am missing something. Thoughts?



BTW: I created the same rule in SSL and HTTP to check if the header didn't exist and then create it. Still no dice.


20 Replies