Socket
Socket
Sign inDemoInstall

sap-cf-features

Package Overview
Dependencies
72
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.5 to 0.0.6

12

dist/index.js

@@ -90,3 +90,5 @@ "use strict";

function getDomain(req) {
return req.authInfo ? req.authInfo.subdomain : "";
// when using passport req.authInfo will contain tenant info.
// when using the approuter, req.user.tenant is containing the tenant id.
return req.authInfo ? req.authInfo.subdomain : req.user ? req.user.tenant : "";
}

@@ -104,2 +106,10 @@ function respond(res, next, result, status = 200) {

}
router.use(function checkAuth(req, res, next) {
//@ts-ignore
if (!req.authInfo && !req.user) {
res.statusCode = 401;
res.end('Unauthorized');
}
next();
});
router.get('/:flagName', (req, res, next) => __awaiter(this, void 0, void 0, function* () {

@@ -106,0 +116,0 @@ //@ts-ignore

2

package.json
{
"name": "sap-cf-features",
"version": "0.0.5",
"version": "0.0.6",
"description": "Read SAP CF feature flags in nodejs",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc