Skip to content

Commit

Permalink
fix request abort for node 16+
Browse files Browse the repository at this point in the history
  • Loading branch information
likev committed Feb 23, 2023
1 parent 9b96cd7 commit 30edc25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/http-proxy/passes/web-incoming.js
Expand Up @@ -143,8 +143,8 @@ module.exports = {
}

// Ensure we abort proxy if request is aborted
req.on('aborted', function () {
proxyReq.abort();
res.on('close', function () {
proxyReq.destroy();
});

// handle errors in proxy and incoming request, just like for forward proxy
Expand Down

0 comments on commit 30edc25

Please sign in to comment.