Skip to content

Conversation

@dajudge
Copy link

@dajudge dajudge commented Jun 26, 2020

Please ensure that your pull request fulfills these requirements:

  • The pull request is being made against the master branch
  • Tests for the changes have been added (for bug fixes / features)

What is the purpose of this pull request? (bug fix, enhancement, new feature,...)

Fixes #142

What changes did you make?

Based on #528:

  • removed changes unrelated to websockets
  • rebased to current master.

Provide some example code that this change will affect, if applicable:

Handles HTTP upgrades used for websockets by forwarding them in proxy mode.

@dajudge
Copy link
Author

dajudge commented Dec 27, 2020

maybe @thornjad can have a look at this? ;-)

@thornjad thornjad self-requested a review July 13, 2021 14:23
@thornjad thornjad added this to the v14.0 milestone Jul 13, 2021
@Ni55aN
Copy link

Ni55aN commented Aug 15, 2021

@thornjad

Comment on lines -166 to +171
var proxy = httpProxy.createProxyServer({});
var proxy = httpProxy.createProxyServer({
target: options.proxy,
changeOrigin: true
});
before.push(function (req, res) {
proxy.web(req, res, {
target: options.proxy,
changeOrigin: true
}, function (err, req, res, target) {
proxy.web(req, res, {}, function (err, req, res, target) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's different about creating the proxy with the options rather than using the options as before?

@thornjad thornjad added the patch version Small, non-breaking, bug fix or trivial change label Aug 20, 2021
@thornjad thornjad removed this from the v14.0 milestone Oct 11, 2021
@taiidani taiidani mentioned this pull request Feb 12, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement patch version Small, non-breaking, bug fix or trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebSockets not supported in proxy mode

3 participants