I am looking into implementing a solution to enable geolocation restrictions on our online forms and asset builder assets. Is it possible to control this via triggers? Specifically, we want to either disable the page load or redirect users to a “Page Not Found” page if they are visiting from outside of whitelisted countries.
Please advise if anyone implemented such solution?
Note: Squiz team had to enable the ESI tags for me and I had to disable cache on asset containing this code.
I tried another solution using Triggers andipGeoLocation.io but it was partially working. It was doing all validation and redirection to Homepage for external users. But for the internal users, it was going into redirection loop and timing out.