I hit a rest service with an Angular2 application.
When doing so, I get a message back stating:
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.
I have read several posts here, and concluded that inorder to get rid of this issue, I need to specify the header from my server response. Which is exactly what I have done.
If I issue a postman request to the same url, I can see the header returned back:
Access-Control-Allow-Headers →Content-Type
Access-Control-Allow-Method →GET, POST
Access-Control-Allow-Origin →*
Do I need to attach any additional headers to make this work?