How to whitelist specific URLs from the Firewall rules

Hi,

Is there a way to whitelist specific wildcard URLs from the Firewall’s rules? The idea would be to secure the traffic coming on https://example.com/* but not on https://api.example.com, is it possible?

Thanks

HI,

You could use the Hostname field to make sure only the naked domain host is subject to whatever rule you create, as in the example below (which would NOT apply to api.example.com/login.php):

Awesome, thank you for the response, this should definitely work. Is it possible to add a * (e.g. example.io/*) to specify every possible path. Let’s say I just add this :

It would 1) NOT apply to api.example.com and 2) apply on every path of example.com, am I right?

No. The Hostname field is only to refer to the host element, it should not include any other part of the URL.

If you want to challenge any visitor to any page on your site, you could just have the hostname field by itself with, for instance, the action Challenge:

image

I see ! Thank you, so by adding (http.host eq “example.com”), it will NOT apply on api.example.com and apply on every URLs of example.com.