Front-end application in Angular 1 and My APIs are built on Laravel and located in different server then sure i will face Cross Origin Request Sharing (CORS) problem and my APIs will not return expected results.
I faced the issue and according to some solutions I added some (following code)headers on index.php of Laravel but still I was not able to solve the issue.
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: *');
header('Access-Control-Allow-Headers: *');
ERROR Message: on chrome browser,
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:8100' is therefore not allowed access.