socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

Opera problem with cross domain / port requests

Open kitek opened this issue 15 years ago • 1 comments

Hi, I'm using:

node: v0.6.2 socket.io: 0.8.7 Socket.IO.js build:0.8.7 Opera 11.52

and i have a comunication problem with Opera when socket.io and webserver are located on different port / host. I have created a simple example (based on your chat example) to reproduce an error: https://github.com/kitek/socket.io/commit/9b7d54815879d9cc7529644be78eae101c46a0bd

I think Opera can't establish connection to socket.io and it is associated with support for Cross-Origin Resource Sharing.

kitek avatar Nov 21 '11 23:11 kitek

I use Opera as well and it works for cross-domain via jsonp. You are using quite non-production scheme. My working environment is site.local, comet.site.local(instead of localhost:300x). All proxied through HaProxy. It emulates live environment on production.

Opera can have issue especially with localhost. You can try to put it in your etc/hosts alias to 'yoursite.local' and use it instead of localhost.

cris avatar Nov 22 '11 13:11 cris