mizzao / meteor-sharejs

Meteor smart package for transparently adding ShareJS editors to an app
MIT License
225 stars 53 forks source link

Use Meteor.absoluteUrl to fix mobile #93

Open edemaine opened 7 years ago

edemaine commented 7 years ago

On mobile (e.g. Android), window.location is http://localhost:port (a local mirror server running on but Meteor.absoluteUrl() returns the actual remote server, which is what we want for ShareJS. I've tested that this small patch works on both mobile and on regular web browsers.

This setup also requires tweaking with CORS settings. I've added some documentation to the README about how this can be done (but didn't change the sample settings file, as many people may want to do this).