AngularJS: No “Access-Control-Allow-Origin” header is present on the requested resource [duplicate]

This is a server side issue. You don’t need to add any headers in angular for cors.
You need to add header on the server side:

Access-Control-Allow-Headers: Content-Type
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Origin: *

First two answers here: How to enable CORS in AngularJs

Leave a Comment