Cs Cart Rest Api Xmlhttprequest

Hello!

This error given when i call my cs cart rest api.

Access to XMLHttpRequest at 'https://exmple.com//any/api/vendors'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.

Hello.

Have you done Postman access tests? Is it just a script ?

Best regards

Robert

Hello Robert,

Thank you for reply, yes I finished the access tests on postman, now it's just a js script.

Thanks

I have same problem you can help me ? Please

Hi!

You need to add the hayla.com (or even * ) into the Access-Control-Allow-Origin header, generated by your local webserver from which you make requests.

You can find additional details in the following article about CORS: