cancel
Showing results for 
Search instead for 
Did you mean: 

combining two irules into one irule

Abed_AL-R
Cirrostratus
Cirrostratus

Hi

 

I want to be sure if I can combine those two iRules into one and if I'm using the correct order of conditions:

 

when ASM_REQUEST_DONE { if { [HTTP::uri] starts_with "/myurl.php/" && [ASM::violation count] <= 4 } {     if { [ASM::violation_data] contains "VIOLATION_OBJ_TYPE"} {         ASM::unblock     } } else {      return } }

 

And this iRule:

 

when ASM_REQUEST_DONE { if { [HTTP::uri] starts_with "/my/url/1.php" } {    ASM::unblock     } }

 

Combined into this one:

 

when ASM_REQUEST_DONE { if { [HTTP::uri] starts_with "/myurl.php/" && [ASM::violation count] <= 4 } {     if { [ASM::violation_data] contains "VIOLATION_OBJ_TYPE"} {         ASM::unblock     } } elseif     { [HTTP::uri] starts_with "/my/url/1.php" } {         ASM::unblock } else {      return } }
1 REPLY 1

cjunior
Nacreous
Nacreous

Hello,

It sounds good for me.

Anyway, think you can remove the Else block since you don't have code at the end to skip with return command.

 

Regards