What's new in Customer Journeys?

Connect and learn more!
Fetching data from external endpoint fails with CORS error but works in PostMan — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Fetching data from external endpoint fails with CORS error but works in PostMan

Received Response
31
Views
3
Comments

Summary:

We are trying to fetch some data from an external API using a BUI extension but the request keeps failing due to a CORS error while the same request works when using Postman. Addin the ' Access-Control-Allow-Origin' header does not make a difference and setting the mode to 'no-cors' only hides the CORS error and instead returns 401.

error:

Access to fetch at 'https://external-source.com/my-endpoint>' from origin 'https://onvz--tst2.custhelp.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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!