Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!