No 'Access-Control-Allow-Origin' header issue with Cors issue.

Hi All,

I have a REST dispatcher class in which I enabled the Parameter HandleCorsRequest = 1;

I can able to access the API using Postman, but not with my web application. It throws the below error.

Access to XMLHttpRequest at 'https://ec2-10-200-XXX-X.com/REST/MRM/get/Message?MessageCode=ERR0006&La...' from origin 'https://ec2-80-106-XX-XXX..com' 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.

Is this something need to be modified in the apache config file ? and where to include ?

also I can see in the Web Trace at CSP GW - this call is returned with 404 error.

Thanks,

Krishna

  • 0
  • 0
  • 185
  • 1
  • 1

Answers

Hi Krishna,

I think you should take a look at this part : Configuring a REST Service to Use CORS

This request is executed by the CSPSystem user.
This user should have READ permission on any databases used by the REST service; if not, the service will respond with an HTTP 404 error.

 

Did you give the good permission to the CSPSystem user ?

 

Best Regards,

 

Comments

Please post:

  1. Your REST broker
  2. Example of request and response from browser