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

support websocket proxying #61

Open
mwcz opened this issue May 15, 2019 · 0 comments
Open

support websocket proxying #61

mwcz opened this issue May 15, 2019 · 0 comments

Comments

@mwcz
Copy link
Contributor

mwcz commented May 15, 2019

WebSockets currently can't be proxied by spandx, making some dev tooling difficult to use. For example, the webpack dev server uses websockets for live reloading. Spandx should add support for websocket proxying.

Whether this requires specific configuration isn't clear. "http" and "https" appear a lot in current config files, so it seems likely that some changes are required. Perhaps omitting protocol would be the best way to enable ws/wss.

For instance, this old config:

routes: {
  "/sockjs-node": {
    host: "https://localhost:1234",
  }
}

Would become:

routes: {
  "/sockjs-node": {
    // use either double slash or no slash?
    host: "//localhost:1234",
    host: "localhost:1234",
  }
}

By omitting protocol, the protocol of the incoming request would be used. Explicit protocol would still be supported of course, so this would not be a breaking change.

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

1 participant