-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Google Chrome 16: XMLHttpRequest cannot load http://localhost:8000/socket.io/1/?t=1330690238048. Origin null is not allowed by Access-Control-Allow-Origin. #776
Comments
use io.connect("http://ip:port") |
i have the same problem [edit] i solved the 404 problem, the proxy only allowed .js calls this is my server var io = require('socket.io').listen(12080);
io.set('origins','*');
io.set('transports', [
'websocket'
, 'flashsocket'
, 'htmlfile'
, 'xhr-polling'
, 'jsonp-polling'
]); this is my lighttpd setup serving socket.io on a subdomain as a proxy as alot of work envroiments only allow cinnection over 443 and 80
|
Have you add the "io.sockets.on('connection', function (socket) {...})" to your server? At 2012-04-02 22:30:08,Mukke reply@reply.github.com wrote:
|
i edited my post turned out my vhost for the proxy was only allowing .js files i think crossdomain should not count if its a subdomain , like if the page is served from www.domain.com and socket.io is served from api.domain.com firefox hasnt problems with this, opera doesnt allow websockets by default and chrome is too strict, i think websockets will be for the next genereation of browsers |
I've added a simple HTTP file server to my app, so instead of opening "file:///home/me/file.html" I open "http://localhost:port" in my browser (chromium). I used this module: https://github.com/cloudhead/node-static |
yes i understand, the problem i'm having though is that alot of clients work in controlled environments (proxies/port blockers) so only have access to common ports (80,443,25,etc), unfortunately those ports are already in use on my server |
Hi there,
If i want to establish a socket.io connection from Google Chrome I get this error message (console):
XMLHttpRequest cannot load http://localhost:8000/socket.io/1/?t=1330690238048. Origin null is not allowed by Access-Control-Allow-Origin.
Firefox works fine.
Am I doing something wrong?
Greets, Simon
The text was updated successfully, but these errors were encountered: