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

169
Vistas
Save token that comes in response to Api

I'm trying to save the token that my server sends on every request. Although apparently "Authorization" is present in the response, I can not print the value.

The code is: ionic2

The server returns: enter image description here

What I can print to the console: enter image description here

On the server I'm using a middleware for cors: enter image description here

How can I get the token that is coming from Header Authorization?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

it looks that you did not expose the header correctly, the browser will not forward this header to your code unless you specify it.

try adding this to you $headers object

'Access-Control-Expose-Headers' => 'Authorization'
over 4 years ago · Santiago Trujillo 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