Forum Discussion
prdg-jason_1930
Nimbostratus
May 20, 2015Insert header
Hi everyone,
I am trying to insert an http header if the http query contains a certain word. Here is what I have:
when HTTP_REQUEST {
if {[string tolower [HTTP::query]] contains "admin"} {...
prdg-jason_1930
Nimbostratus
May 20, 2015Disregard this. It works. LiveHTTPHeaders must just not work correctly. I added to the IRule:
when HTTP_REQUEST { if {[string tolower [HTTP::query]] contains "admin"} { log local0. "Header Inserted" HTTP::header insert SecureAdmin true foreach aHeader [HTTP::header names] { log local0. "$aHeader: [HTTP::header value $aHeader]" } }
and the log shows the header.
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