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

Handle external upgrade for all websocket proxies #843

Merged
merged 2 commits into from
Mar 14, 2017

Conversation

jamesblight
Copy link
Contributor

@jamesblight jamesblight commented Mar 14, 2017

This change upgrades websocket proxies so that an inital http request doesn't have to be made.
https://github.com/chimurai/http-proxy-middleware#external-websocket-upgrade

It supports a proposed change in Create React App by handling the upgrade of any websocket proxy passed in. facebook/create-react-app#1790

I added a test to confirm the upgrade

@jsf-clabot
Copy link

jsf-clabot commented Mar 14, 2017

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Mar 14, 2017

Codecov Report

Merging #843 into master will increase coverage by 0.33%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #843      +/-   ##
==========================================
+ Coverage   72.72%   73.05%   +0.33%     
==========================================
  Files           4        4              
  Lines         407      412       +5     
  Branches      119      120       +1     
==========================================
+ Hits          296      301       +5     
  Misses        111      111
Impacted Files Coverage Δ
lib/Server.js 82.97% <100%> (+0.31%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35a44d1...d24fec3. Read the comment docs.

@SpaceK33z SpaceK33z merged commit d69559a into webpack:master Mar 14, 2017
@SpaceK33z
Copy link
Member

Awesome!! Thanks, I'll release a new version today.

@SpaceK33z
Copy link
Member

This is published in version 2.4.2.

@shellscape
Copy link
Contributor

@jamesblight in working on version 3, we've removed SockJS for sockets across the board, instead replacing it with ws for a WebSocket Server, and native WebSocket on the client. Unfortunately, that move has "broken" tests for proxying WebSockets. The test has been moved here, on the refactor-lib branch https://github.com/webpack/webpack-dev-server/blob/refactor-lib/test/tests/proxy.js#L199. Any chance you would be willing to take a look a this setup? I've been so far unsuccessful in getting it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants