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

The origin is not passed to the ws library. #574

Closed
1 task done
CrisLi opened this issue Jul 18, 2017 · 1 comment
Closed
1 task done

The origin is not passed to the ws library. #574

CrisLi opened this issue Jul 18, 2017 · 1 comment
Labels
enhancement New feature or request

Comments

@CrisLi
Copy link

CrisLi commented Jul 18, 2017

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

You want to:

  • [] report a bug
  • request a feature

Current behavior

We are socket.io-client in the Node env. The target server has origin check. If we use pure ws implementation, the origin can be sent to the server.

The origin is not passed to the ws library in the engine.io-client.

Steps to reproduce (if the current behavior is a bug)

Expected behavior

Setup

  • OS: MacOS 10.11.16
  • browser: Node 8.1.2
  • engine.io version: 3.1.1

Other information (e.g. stacktraces, related issues, suggestions how to fix)

Should we add origin field to the options? There are some other options missing in engine.io-client.

https://github.com/websockets/ws/blob/master/doc/ws.md#new-websocketaddress-protocols-options

The code change should be before this line

this.ws = this.usingBrowserWebSocket ? (protocols ? new WebSocket(uri, protocols) : new WebSocket(uri)) : new WebSocket(uri, protocols, opts);

@darrachequesne
Copy link
Member

Closed by d134fee (included in engine.io-client@4.1.0)

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

No branches or pull requests

2 participants