I'm implementing jwt
bearer
on my app. On my route controller block I have this :
utils.createToken({ email: user.email}, function(token){
res.set({'Authorization': 'Bearer ' + token});
res.status(200).json(user);
})
But on the response object there's nothing on the header
:
What did I missed? Thanks.
There is nothing obviously wrong with the Express server-side code to set the header.
The headers
field shown in the response object is a function that returns a header or headers. Calling console.log(response.headers())
in the browser will show the full response header contents.