I am having a hard time writing an irule that blocks/drops HTTP/S requests to a VIP if the URI contains the following: javax.faces.resource/dynamiccontent.properties.xhtml
I have written the irule as such but the F5 keeps stating “01070151:3: Rule [/Common/irule_block_javax] error: /Common/irule_block_javax:6: error: [command is not valid in the current scope][}]”
when HTTP_REQUEST {
if { [string tolower [HTTP::path]] contains "/javax.faces.resource/dynamiccontent.properties.xhtml" } {
discard
}
}
}
I was having issues with the “Actions” portion so I went back to the irule and fixed it. The error I was getting “01070151:3: Rule [/Common/irule_block_javax] error: /Common/irule_block_javax:6: error: [command is not valid in the current scope][}]” was stating that in line 6 I had one too many curly braces. I deleted the curly brace in line 6 and the irule now looks like this and is working:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/javax.faces.resource/dynamiccontent.properties.xhtml" } {
discard
}
}
I was having issues with the “Actions” portion so I went back to the irule and fixed it. The error I was getting “01070151:3: Rule [/Common/irule_block_javax] error: /Common/irule_block_javax:6: error: [command is not valid in the current scope][}]” was stating that in line 6 I had one too many curly braces. I deleted the curly brace in line 6 and the irule now looks like this and is working:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/javax.faces.resource/dynamiccontent.properties.xhtml" } {
discard
}
}