Dealing with CORS


#1

Working with TokBox and getting a CORS error I have NO idea how to deal with? What do I have to do to get Meteor to do cross origin sharing in this circumstance?

XMLHttpRequest cannot load https://api.opentok.com/session/create. Response to preflight request doesn’t pass access control check: The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’. Origin ‘http://localhost:3000’ is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

It doesn’t work on a public domain either. Any help would be appreciated.


#2

Any luck figuring this out? Running into the same issue.


#3

It looks similar to something I ran into earlier. At the risk of being completely unhelpful, this is something I was going to fix, but have not got around to it yet. Sorry.


#4

Have you tried limiting your calls to the server side?

I used to get this error when doing third party api calls in meteor methods which first run on the client side, resulting in this kind of cors errors.

My solution was to put the call in a if(Meteor. isServer) {… api call…}

hope it helps


#5

Any fix for this, I keep running into it any time I try and use a third party service (Mailgun email validation, Algolia Search, Keen IO). EDXTREMELY annoying and desperate for a solution.