We have a website (www.example.com) that needs to block EU countries due to GDPR non-compliance. This will be temporary until we can put in a fix, but while blocking countries currently in the EU how can we allow certain URL’s to bypass this block (www.example.com/Business*)? Apologies if this was covered in a previous thread.
Probably the best way to do this type of more complex logic would be to use Cloudflare Workers.
Thanks @cloonan, this might be possible however we have page rules in effect which redirect that /Business traffic to a separate AWS cloud environment so I don’t know if allowing certain IPs will work in our scenario, but I will research it further. Thank you for your suggestion.
If you have an Enterprise account here it would be way better asking them directly for help. It will be surely better and more specific.
Check out this discussion with an example of how to redirect based on GeoIP/country location. It obviously isn’t quite the same but it might be a reasonable starting point.
I tried, this was the response i received from Enterprise Support:
"I can see that Workers are enabled on your domain. As to writing the worker, you will have to do that on your end but we will be happy to help you troubleshoot if you run into issues.
Please let us know if you have any further questions or issues by replying to this e-mail or ticket."
The problem is i have no idea where to start. I did recently (today) speak with my Enterprise technical account rep and he told me there is a new feature coming soon to CF that will possibly address this problem. I can follow up with this thread once i get a definitive solution. Thank you all for chiming in, I appreciate the quick responses and all advice given.
I wrote a small service worker example that does what you are trying to achieve.