CORS error when invoking Pega REST Service
Error occurs on invoking the Pega 7.3.1 REST Service from an AngularJS application on the localhost:4200 in the browser console.
Access to XMLHttpRequest at 'http://abcw:8080/prweb/api/v1/data/D_VertragsListe' from origin 'http://localhost:4200' 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.
Steps to Reproduce
- Create a data page in Pega 7.3.1 which is deployed on JBOSS 7 or Oracle.
- Create an Endpoint policy CORS exception.
- Invoke the API Serivce from the AngularJS application.
- Post to the endpoint.
A defect in Pegasystems’ code or rules.
The header was not set. CORS did not send the Access-Control-Allow-Origin header.
Apply HFix-42650 and restart the server.
0% found this useful