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

connect-concierge

Package Overview
Dependencies
Maintainers
1
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-concierge - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

14

libs/connect-concierge.js

@@ -30,5 +30,8 @@

ConnectConcierge.prototype.getEnvironment = function() {
ConnectConcierge.prototype.getEnvironment = function(options) {
return function(req, res, next) {
var env, envRegex, match;
if (_isAdmin(req, options) === false) {
return next();
}
envRegex = /(.*)\.vtex(commerce|commercebeta|commercealfa|commercestable|local)\.com.br/;

@@ -180,7 +183,12 @@ match = envRegex.exec(req.headers.host) || [];

match = vtexIdCookieRegexp.exec(req.headers.cookie);
VtexIdclientAutCookie = match[1];
if (match === null) {
VtexIdclientAutCookie = null;
} else {
if (match != null) {
VtexIdclientAutCookie = match[1];
}
}
req.cookies || (req.cookies = {});
req.cookies.VtexIdclientAutCookie = VtexIdclientAutCookie;
if (req.cookies.VtexIdclientAutCookie == null) {
console.log('redirecting to ', redirectUrl);
res.statusCode = 302;

@@ -187,0 +195,0 @@ res.setHeader('Location', redirectUrl);

{
"name": "connect-concierge",
"version": "0.3.1",
"version": "0.3.2",
"description": "Connect middlewares for VTEX backoffice app Concierge",

@@ -5,0 +5,0 @@ "main": "main.js",

Sorry, the diff of this file is not supported yet

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