-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot access client library from a website hosted elsewhere (cross domain requests) #77
Comments
The most recent version of browserchannel in git enables cross-origin requests by default. For now, you can use that. I haven't pushed to npm yet because I'm not entirely comfortable with it. (Obviously, cross-origin requests are a security problem). |
Great, Let me try it with new version of Browser channel. Thanks for pointing it out :) It would be of great use, if sharejs can be embedded on any web page ! |
I've updated browserchannel to support this behind a flag. Set (Actually, don't use *. Whatever you put there will be sent as the Access-Control-Allow-Origin header. See this: https://developer.mozilla.org/en/http_access_control ) |
Ok thanks, thats working fine now :) |
Can you explain how to set this up? The Client API page (https://github.com/share/ShareJS/wiki/Client-API) doesn't say anything about how to setup cross origin stuff in the options. I tried this:
But I still get:
I even added this to my .htaccess but it didn't make a difference:
|
Just realized that the
This is using ShareJS installed from npm: Any help would be appreciated. |
Try adding |
Fixed here: #228 |
It is not possible to embed a sharejs pad in a website hosted elsewhere. This may be because of the same origin policy.
The text was updated successfully, but these errors were encountered: