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

168
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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