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

@sap-ux/backend-proxy-middleware

Package Overview
Dependencies
Maintainers
3
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-ux/backend-proxy-middleware - npm Package Compare versions

Comparing version 0.6.21 to 0.6.22

13

dist/middleware.js

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

const logger_1 = require("@sap-ux/logger");
const express_1 = require("express");
const http_proxy_middleware_1 = require("http-proxy-middleware");

@@ -50,3 +49,2 @@ const proxy_1 = require("./base/proxy");

dotenv_1.default.config();
const router = express_1.Router();
const backend = options.configuration.backend;

@@ -57,4 +55,12 @@ const configOptions = (_a = options.configuration.options) !== null && _a !== void 0 ? _a : {};

const proxyOptions = yield proxy_1.generateProxyMiddlewareOptions(options.configuration.backend, configOptions, logger);
router.use(backend.path, http_proxy_middleware_1.createProxyMiddleware(proxyOptions));
const proxyFn = http_proxy_middleware_1.createProxyMiddleware(proxyOptions);
logger.info(`Starting backend-proxy-middleware using following configuration:\nbackend: ${JSON.stringify(Object.assign(Object.assign({}, backend), { proxy: formatProxyForLogging(backend.proxy) }))}\noptions: ${JSON.stringify(configOptions)}'`);
return (req, res, next) => {
if (req.path.startsWith(backend.path)) {
proxyFn(req, res, next);
}
else {
next();
}
};
}

@@ -66,4 +72,3 @@ catch (e) {

}
return router;
});
//# sourceMappingURL=middleware.js.map

@@ -12,3 +12,3 @@ {

},
"version": "0.6.21",
"version": "0.6.22",
"license": "Apache-2.0",

@@ -25,3 +25,3 @@ "author": "@SAP/ux-tools-team",

"dependencies": {
"@sap-ux/axios-extension": "0.9.7",
"@sap-ux/axios-extension": "0.9.8",
"@sap-ux/btp-utils": "0.11.1",

@@ -32,3 +32,2 @@ "@sap-ux/logger": "0.3.0",

"dotenv": "16.0.0",
"express": "4.17.2",
"http-proxy-middleware": "2.0.1",

@@ -41,7 +40,8 @@ "https-proxy-agent": "5.0.0",

"@types/express": "4.17.13",
"@types/http-proxy": "^1.17.5",
"@types/prompts": "2.0.14",
"@types/http-proxy": "^1.17.5",
"@types/supertest": "2.0.12",
"express": "4.17.2",
"nock": "13.2.4",
"supertest": "6.2.2",
"@types/supertest": "2.0.12",
"yaml": "2.0.0-10"

@@ -48,0 +48,0 @@ },

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