Skip to content

Websocket URL should not include /sockjs-node in the name #621

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

Closed
SpaceK33z opened this issue Sep 22, 2016 · 4 comments
Closed

Websocket URL should not include /sockjs-node in the name #621

SpaceK33z opened this issue Sep 22, 2016 · 4 comments

Comments

@SpaceK33z
Copy link
Member

The current websocket URL is /sockjs-node. This is weird, because the websocket library should be completely abstracted from the user. This has some advantages:

  • Allows us to switch to another websocket library without a breaking change.
  • The URL /sockjs-node might already be in use by the user.
  • It makes clear for the user that this websocket connection is from webpack-dev-server (can be confusing in DevTools).
  • The current URL is not consistent with the bundles that are currently served, e.g. /__webpack_dev_server__/live.bundle.js.

Note that changing the URL would be a breaking change.

@kellyrmilligan
Copy link
Contributor

related to this, it would be cool to be able to set the handler for sockjs to be under a subpath as well if you have a few sub apps running at the same time. similar to how you can configure the public path to be a subdirectory, historyapifallback can be configured, etc.

@shellscape
Copy link
Contributor

We're going to completely remove SockJS in favor of a native solution for v3, tracking in #1057. While this is still a valid issue, it'll be moot when that work completes, and so, closing.

@ggoodman
Copy link

@shellscape I've reviewed #1057 and don't see any mention of adding support for adding a prefix to the websocket path as per #621 (comment).

What would my options be to force the client to look for the socket under a prefix pathname?

@shellscape
Copy link
Contributor

@ggoodman the prefix won't be necessary in v3 because of the complete removal of SockJS in favor of native WebSocket. As of now, there isn't a solution for the 2.x branch. If this is something you're interested in submitting a PR for, we'll welcome and review it.

@michael-ciniawsky michael-ciniawsky removed this from the 3.1.6 milestone Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants