mondora / asteroid

An alternative client for a Meteor backend
MIT License
734 stars 101 forks source link

Not Working When accessing Server in Different Host #81

Closed radiegtya closed 8 years ago

radiegtya commented 8 years ago

var ddp = new Asteroid("my-meteor-on-digitalocean.com");

subscribe etc not working

Please help

davidebianchi commented 8 years ago

Hi @radiegtya, it might be a cross-origin communication issue. You can try to add in your meteor project the mondora:asteroid package, which allows cross-origin communication (configurable via environment variables).

radiegtya commented 8 years ago

@davidebianchi : thanks david, I'll try that ASAP. :100:

radiegtya commented 8 years ago

@davidebianchi : I've tried adding mondora:asteroid + setting up the ALLOWED_ORIGIN environment var from mup.json (because I am deploying my meteor apps using MUP) to : * (to allow access from every host)

but still not working. Any Idea about this?

fermuch commented 8 years ago

do you have websockets enabled? For example, with the free layer of cloudflare SSL (only business users can SSL on websockets) we have to disable websockets. Is this your case?

radiegtya commented 8 years ago

Have found the solution. In Mup add environment with name server of current server. Then add asteroid plugin.