React-embed not working - CORS error

  1. My goal: embed retool app on a page in my react site

  2. Issue: following the guide at Embed web apps | Retool Docs and calling /api/embedUrl produces CORS error.

  3. Steps I've taken to troubleshoot:

I've made sure domains match and I'm using HTTPS. retool app URL is retool.bbb.com and the parent app url is ccc-staging.bbb.com (url info replaced with b and c).

I am completely sure the retool.bbb.com custom domain works and DNS has been set up correctly. both URLS are at bbb.com, so there should be any CORS errors.

  1. Additional info: Cloud-Hosted, exact error is:

Access to fetch at 'https://retool.bbb.com/api/embedUrl' from origin 'https://ccc-staging.bbb.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.

I saw in a post that you guys recently had to roll back a breaking change that caused CORS errors. wonder if this is related.....

*shouldn't be any CORS errors... typo and can't edit original post