Discussions

Ask a Question
Back to All

SDK cors error frontend project

Hi,

I'm trying to start from this (project) since (here) you state that it is a Frontend project. I deployed the project as is on my server but I get a cors error saying that my domain can't make calls to api.heygen.com. Here's the full error:

Access to fetch at 'https://api.heygen.com/v1/streaming.new' from origin 'https://myorigin.com' has been blocked by CORS policy: 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

If I run the project locally everything works since I'm on localhost and you probably set the cors for that.
I think that maybe you should set the "Access-Control-Allow-Origin" header to "*" since this is intended to be a public api for anyone to use.

Can you fix this? What can I do to let you fix this?

Thanks