Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

http-proxy-middleware

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-proxy-middleware - npm Package Compare versions

Comparing version 0.20.0-beta.1 to 0.20.0-beta.2

12

dist/http-proxy-middleware.js

@@ -22,2 +22,3 @@ "use strict";

this.logger = logger_1.getInstance();
this.wsInternalSubscribed = false;
// https://github.com/Microsoft/TypeScript/wiki/'this'-in-TypeScript#red-flags-for-this

@@ -38,3 +39,6 @@ this.middleware = (req, res, next) => __awaiter(this, void 0, void 0, function* () {

this.catchUpgradeRequest = server => {
server.once('upgrade', this.handleUpgrade);
server.on('upgrade', this.handleUpgrade);
// prevent duplicate upgrade handling;
// in case external upgrade is also configured
this.wsInternalSubscribed = true;
};

@@ -129,5 +133,9 @@ this.handleUpgrade = (req, socket, head) => {

// expose function to upgrade externally
this.middleware.upgrade = this.handleUpgrade;
this.middleware.upgrade = (req, socket, head) => {
if (!this.wsInternalSubscribed) {
this.handleUpgrade(req, socket, head);
}
};
}
}
exports.HttpProxyMiddleware = HttpProxyMiddleware;

2

package.json
{
"name": "http-proxy-middleware",
"version": "0.20.0-beta.1",
"version": "0.20.0-beta.2",
"description": "The one-liner node.js proxy middleware for connect, express and browser-sync",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc