How to detect whether or not a user or resource is being geo-blocked?
www.example.comvideos.example.com which is geo-restricted/blocked via CloudFront geo restrictionhttp/403 Forbidden or http/200 OK depending on this geo location.A geo blocked user cannot probe resources from the restricted CDN and check the return code being either http/200 OK or http/403 Forbidden:
Since the requests originates from www. and then send towards a different domain video. it is a different domain so the browser must send a CORS/preflight requests. But this request will be blocked due to the geo restriction.
From JavaScript perspective it simply fails the CORS preflight with no error details.
I tried fetching different ContentTypes in combination with fetch mode: cors/no-cors that would qualify for a Simple Request and thus not require CORS — but no success so far.