CORS issue with custom domains

I’m making a request to api.mydomain/endpoint from mydomain. Both ends live here on Render. I’m getting the error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at […] (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)

I do have the header set and in-fact everything works fine when I don’t use my custom domains but rather the onrender.com versions.

Has anyone come up against this or something similar?

Hey,

I see that you’ve already initiated a support ticket with us. To avoid any confusion or duplicate efforts, let’s continue the conversation there and close this topic.

Regards.
Jérémy, Render Support