Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

285
Vistas
Is it possible to prevent fake dns blocking (js fetch)

I'm currently working on a website A that is using one of my apis on a website B.

The website A ask the website B some informations and I was thinking that if someone use a fake dns (or put the website B URL in his hosts file), it'll be impossible for my javascript code to get these informations.

Here's my question: is it possible to prevent it or not?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

there are multiple ways to prevent that, but not fully.

First, you could perform a dns lookup with javascript as described here.

As another option, you could just use the ip of your target server. But this isn't an ideal solution for production environments.

The third way that comes to mind is a proxy of your api via website A.

While all three of them are not very secure, keep in mind, that a potential user could also modify the client-side javascript code.

Also, welcome to StackOverflow!

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda