Forum Discussion

veredgf's avatar
veredgf
Icon for Nimbostratus rankNimbostratus
Jun 12, 2019

Disabling certain blocking policy element for specific URLs

We have a website where we need to bypass the illegal http response (500) for certain URLs.

 

The URLs are wildcards - i.e. \folder\folder\*

 

Any suggestions?

 

2 Replies

  • Not sure if this is the best solution, but this seems to work. Copy your policy and name it for example 'my_policy_allow_500'. In this policy, you will allow 500 as a valid response. So you have the policy 'my_policy' enabled on your virtual server. And select when needed the 'my_policy_allow_500' when needed.

    when HTTP_REQUEST {
        if { [HTTP::uri] starts_with "/folder/folder/" } {
            ASM::enable /Common/my_policy_allow_500
        }
    }

    The disadvantage of this approach is that you have to maintain two policies. Hopefully someone comes up with a better solution 🙂

    • veredgf's avatar
      veredgf
      Icon for Nimbostratus rankNimbostratus

      Hi, Thank you very much. This is indeed simple to create. I also agree that possibly there could be another solution, but if there isn't, this is a very useful solution.

       

      Thanks!