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

244
Vistas
Get cookie's value from another domain (both behind the same virtual reverse proxy server)

What I am trying to achieve is when a user is logged in on main-app-site.com they are also logged in when visiting client-site-a.com, client-site-b.com, and so on.

Please, read on as client-site-a.com is a reverse proxy of content on main-app-site.com hence, both $_SERVER['HTTP_HOST'] and $_SERVER['HTTP_SERVER'] are set to main-app-site.com on all subdomains and custom domains.

In other words, I want to retrieve a cookie from main-app-site.com from all other domains on the same virtual proxy server.

main-app-site.com is where users log in (currently via ajax) from client-site-a.com.

I have read and tried many things (iframe, js, PHP) to no avail.

Also, have add_header "Access-Control-Allow-Origin" "*"; set already, and that works fine when accessing main-app-site.com via AJAX from client-site-a.com

I would think since they have the same HOST & SERVER, the browser would share the cookie of that host/server, but that doesn't seem to be the case — or maybe I am missing an NGINX directive that I should add?

I have exhausted all I could learn and try.

Anything else I can try at this point?

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