1

Authorization header comes in network as can seen in picture. But it doesn't show in the axios response after I make a login request.

 response = await axios
    .post(apiUrl + "/login", 
    {
        "user": {
            email,
            password
        },
    }
    );   

https://i.sstatic.net/5g40o.png https://i.sstatic.net/RqMFh.png

3
  • did you try with axios interceptor , response interceptor? Commented Nov 16, 2021 at 12:47
  • Did you try to print response.headers Commented Nov 16, 2021 at 12:48
  • yes it doesnt show authorization header @AyyubKolsawala Commented Nov 16, 2021 at 13:12

1 Answer 1

3

I could find an article over here which says that you need to enable Access-Control-Expose-Headers in your backend app. Also here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.