angularjs 6 python django rest framework crossdomain api call issue
angularjs 6 python django rest framework crossdomain api call issue I have configured django rest framework with python 3. And the API is working fine in postman. But am facing a cross domain issue, when I call this api through my angualar 6 project. OS: Mac OS I have included oauth2 for authentication. It works well with postman API Url: http://127.0.0.1:7777/api/v1/token/ Angular 6 website url: http://localhost:5000/#/login When I called this with angualrjs it shows the following error. Mozilla: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://127.0.0.1:7777/api/v1/token/. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Safari: Failed to load resource: Origin http://localhost:5000 is not allowed by Access-Control-Allow-Origin. XMLHttpRequest cannot load http://127.0.0.1:7777/api/v1/token/. Origin http://localhost:5000 is not allowed by Access-Control-Allow-Origin. Chrome: Failed to load http://127.0.0.1:7777/ap...