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

222
Vistas
Can't set document.cookie on domain mapped to IP in hosts file

I have a dev server that I map to a domain name using the /etc/hosts file for testing purposes.

I set a cookie using document.cookie. This works when the site is sitting on the production server but it fails when I have the domain overridden in my hosts file. I log the cookie value before and after executing the script using console.log(document.cookie) and it shows that the cookie doesn't get set. The dev server is NOT local.

I am not sure that this is the cause of my problems but I'm hoping for suggestions. What are my options to make it work on the dev server?

about 4 years ago · Juan Pablo Isaza
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