CORS for deploy environments

Hi!

I’m receiving unwanted CORS-errors when trying to fetch some data from an Azure Storage account. We’ve tried to configure the CORS rules to allow requests from <our_subdomain>.netlify.app and it works great!

However when inside a deploy environment the URL looks like this: XXX-<our_subdomain>.netlify.app which makes the CORS rule not apply and Azure Storage account doesn’t allow a wildcard in the middle of a subdomain.

Currently we’ve been forced to change the CORS rule to *.netlify.app but we rather have it scoped to our site.

Do you have any tips and thought in this matter?

hi there terrabit,

could you pop a screenshot of the exact error you are recieving and also show us how you are making that API call to fetch data? thanks.