Open
Description
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.