Access to XMLHttpRequest at 'http://www.----------.com/efsapi/api/AdvanceQuote? segmentcode=--&customercode=--&por=--&fdc=--&toscode=--' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource (edited)
This error in i am facing in angularjs and we are using java as backend. tried the below code in front-end
'Access-Control-Allow-Origin': true,
'Content-Type': 'application/json; charset=utf-8',
"X-Requested-With": "XMLHttpRequest
Could you please tell how to handle this CORS error? (Platforms Angularjs & Java)