Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I am developing angularjs site and using https://github.com/auth0/angular-jwt for api authorization.


I am using jwt token for authorization and facing issue adding token to request header.

My angularjs site running on localhost:3000 and I a have whitelisted the localhost domain.

When made request to api running on localhost with different port number i.e., localhost:8080/api/demoapi, the token is not getting added to request header.

For trial purpose if I change the port number of api to 3000,
hence changing api port same as angularjs site, it works.

How can i resolve this issue?


What I have tried:

Whitelisting domain
Enabled cors on server side
Posted
Updated 8-Nov-16 1:35am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900