Skip to content
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

Online examples are not functioning #2736

Closed
1 of 2 tasks
AntiAsko opened this issue Oct 24, 2016 · 2 comments
Closed
1 of 2 tasks

Online examples are not functioning #2736

AntiAsko opened this issue Oct 24, 2016 · 2 comments

Comments

@AntiAsko
Copy link

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug
  • request a feature

Current behaviour

While trying to check your online examples I saw that none of them is functional. Whether is a known issue or not I considered a good idea to inform you. The error receiving is:

XMLHttpRequest cannot load http://slack.socket.io/socket.io/?EIO=3&transport=polling&t=LVuf8-O. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://socket.io' is therefore not allowed access. The response had HTTP status code 502.

Setup

  • OS: Ubuntu 16.04
  • browser: chrome
  • socket.io version:
@iongion
Copy link

iongion commented Oct 26, 2016

Had some headaches with the middleware for authentication, all the examples say to migrate to this:

io.use(function(socket, next) {
  var handshakeData = socket.request;
  next();
});

But there I found it to be more like this:

io.use(function(socket, next) {
  var handshakeData = socket.handshake;
  next();
});

@darrachequesne
Copy link
Member

That should be fixed now, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants