http-server
http-server copied to clipboard
Proxy websockets
Proxy websockets when --websocket is given.
Relevant issues
Fixes issue https://github.com/http-party/http-server/issues/142
I took the PR from @fabioimpe at https://github.com/http-party/http-server/pull/528, removed style changes (and made sure not to add any of my own), and removed the changes to the changeOrigin parameter.
And of course, I tested whether it worked, which it does.
Is there any way to test this? This should have tests before I merge it, if a unit test for this is complex I'll do a manual test later.
Well, it relies on another server working with websockets. A unit test could be done, but would require quite a bit of work.
This pull request has been inactive for 360 days
#872 (another websocket impl) was merged. The changes from this PR are present in #933, with a modification so it adds the --websocket flag to the existing implementation.
Merged #933. You should still get contribution credit on GitHub because I kept your commits in my modified branch and did a rebase-and-merge to preserve them. Also, please take a look at the unit test from that PR - you mentioned that testing the websockets server requires additional effort but I was able to put something together based on examples from other unit tests. Let me know if you see a way we can make this easier or if something should be documented better.
Thank you!