Forum Discussion
JG_249184
May 21, 2017Altocumulus
Ignore case sensitive in the HTTP host header request
Hello -
I am trying to replace the 3 bottom if statements with 1 line that ignores case sensitive characters in the HTTP host header request. The application guys have different configuration files sending a mix of either upper or lower cases and some all together.
when HTTP_REQUEST { if { [HTTP::header "Host"] equals "myapplication.mydomain.com" } {
} elseif { [HTTP::header "Host"] equals "MyApplication.mydomain.com" } { } elseif { [HTTP::header "Host"] equals "MYAPPLICATION.mydomain.com" } {
} else { reject
- Stanislas_Piro2Cumulonimbus
Hi,
you can use this irule:
when HTTP_REQUEST { if { !([string tolower [HTTP::host]] equals "myapplication.mydomain.com") } { reject } }
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