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

219
Visualizações
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 à 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