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

53
Vistas
duplicated cookies and wrong order used for http request

I am using Fetch API with {credentials:"include"} for requests described down bellow.

Also my HTTP server returning Access-Control-Allow-Credentials: true header.


I have a 3 domains:

  1. example.com
  2. application.example.com
  3. server.example.com

🍪 server.example.com/sign-in will send a cookie key with Domain=example.com; HttpOnly=true; Path=/. The key is a encoded string with all possible permissions included.

As I found out the key is accessible from every single subdomain which is good. So application subdomain have key as well.

🍪 But application.example.com/test will send a cookie key with Domain=application.example.com; HttpOnly=true; Path=/test which is a key with ->limited<- permissions included.

So the cookies for subdomain application looks like:

Name Domain Path HttpOnly
key .example.com / true
key .application.example.com /test true

The problem

The problem starts when I am trying to request server.example.com from application.example.com. The first cookie (wildcard) is used. But why? I am on application subdomain and also I have more relevant (the second) cookie.

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