Forum Discussion
NickAD
Apr 13, 2017Cirrus
iRule for blocking specific string in header & displaying blocking page
I am wondering if I can create an iRule to block a request if a certain string appears anywhere in the header.
For example, it would be something like...
when HTTP_REQUEST {
if { [HTTP::header ...
- Apr 14, 2017
If you are referring to support ID then I assume you are using ASM. In that case then you need to create a custom signature. The instructions on how to do this can be found in the manual here and the content for your signature should be...
headercontent:"test1234";nocase;
There is no iRule needed for a blocking page to show a support ID. That is what will be shown by default when this signature is matched.
If on the other hand you are not using ASM then what kind of support ID were you after?
Faruk_AYDIN
Apr 14, 2017Nimbostratus
Hi Guy,
Use this code:
when HTTP_REQUEST {
Loop through each header by name
foreach headerName [HTTP::header names] {
if { [HTTP::header $headerName] contains "test1234" } {
log local0. "$headerName header contains test1234"
drop
return
}
}
}
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