Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

199
Visualizações
How to detect geo blocking in a browser

How to detect whether or not a user or resource is being geo-blocked?

Given
  • Two AWS CloudFront Distributions:
    • Website at www.example.com
    • 2nd domain at videos.example.com which is geo-restricted/blocked via CloudFront geo restriction
  • CORS is working, it is possible to execute requests from the website towards the video CDN if user is not geo blocked
  • When a user accesses the video CDN he'll see http/403 Forbidden or http/200 OK depending on this geo location.
Problem

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.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda