Forum Discussion
[Irule][ASM] Header name with no header value
Hi Hoang Hung,
You can check this article: Disabling a violation for a URL using an iRule (f5.com)
According to article, first get the violation name in a separate irule and then use that violation name in second irule with your host header condition. Do not forget to change the "Specific_ASM_Violation" value with the name of matched violation, when the request with header name "abc" has no value.
when ASM_REQUEST_DONE {
if {[ASM::violation names] contains "Specific_ASM_Violation" and [HTTP::header "abc"] equals "" } {
ASM::unblock
log local0. "ASM unblocking"
}
}
Thank Oguzy
I was been read article, I saw F5 use irule get violation name.
But I had event log on F5. Is it Http protocol compliance failed , right ?
Thanks
Hoang Hung
- oguzySep 18, 2021Cirrostratus
Hi Hoang,
Could you please try to determine the exact violation name using the following steps:
- Log in to the Configuration utility.
- Go to Local Traffic > iRules > iRule list.
- Select Create.
- For Definition, enter the following iRule code:
- when ASM_REQUEST_DONE {
- log local0. "ASM violation name: [ASM::violation names]"
- }
- Select Update.
- Associate the iRule with the appropriate virtual server.
- Send a request that triggers the violation that you want to forward to the OWS.
- Log in to the BIG-IP command line and search for the name of the violation.
- For example:
- grep -i violation /var/log/ltm
- The following log entry shows an example of a violation name as it should be used in the iRule:
- tmm[25875]: Rule /Common/asm_violation <ASM_REQUEST_DONE>: ASM violation name: VIOLATION_ILLEGAL_METHOD
- After you determine the violation name that you want to use in the iRule, you can remove the previous iRule from the virtual server configuration.
Recent Discussions
Related Content
* 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