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

139
Vistas
Accessing cookie set by back-end on another domain

If my backend is on abc.com and sets a cookie in the frontend which is on xyz.com then I am not able to access the cookie on the frontend using document.cookie , is there a work-around for this issue ?

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

0

No.

If it was possible then Evil-Hacker.com could read the cookies from Your-Bank.com and gain access to your bank account.

Cookies are accessible, directly, only if the Domain parameter of the cookie matches a segment of the domain of the page trying to read them. (e.g. foo.example.com could read a cookie set for example.com). Top-level domains (like .com) are excluded from this.

An Ajax request, with the withCredentials flag set, could make a request to the domain the served the cookies (this would need permission via CORS with a pre-flight). A server-side script on that domain could then read the cookie and echo it back in the body of the response where JS could read it. Obviously this requires the domain the cookie belongs to to co-operate by providing such a webservice.

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