Skip to content

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

Closed
@CrisLi

Description

@CrisLi

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions