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.10 to 0.3.11

21

libs/connect-concierge.js

@@ -7,3 +7,3 @@

(function() {
var ConnectConcierge, NodeCache, connectVtexid, dust, fs, request, urlencode, utils, _, _isAdmin;
var ConnectConcierge, NodeCache, clearCookie, connectVtexid, dust, fs, parseCookies, redirect, request, urlencode, utils, _, _isAdmin;

@@ -28,2 +28,8 @@ fs = require('fs');

parseCookies = utils.parseCookies;
redirect = utils.redirect;
clearCookie = utils.clearCookie;
ConnectConcierge = (function() {

@@ -33,5 +39,13 @@ function ConnectConcierge() {}

ConnectConcierge.prototype.getMiddlewares = function(options) {
return [this.getEnvironment(options), connectVtexid(options), this.resolveTags(options), this.licenseManagerCall(options), this.resolveTemplate(options), this.renderTemplate(options)];
return [this.prepareReq(options), this.getEnvironment(options), connectVtexid(options), this.resolveTags(options), this.licenseManagerCall(options), this.resolveTemplate(options), this.renderTemplate(options)];
};
ConnectConcierge.prototype.prepareReq = function(options) {
return function(req, res, next) {
console.log(req.url);
req.cookies = parseCookies(req);
return next();
};
};
ConnectConcierge.prototype.getEnvironment = function(options) {

@@ -153,5 +167,6 @@ return function(req, res, next) {

if (bodyObj.error) {
res.clearCookie = clearCookie;
res.clearCookie('VtexIdclientAutCookie');
res.statusCode = 302;
res.setHeader('Location', "/admin/Site/Login.aspx?returnUrl=" + req.url);
res.setHeader('Location', "/admin/login?returnUrl=" + req.url);
return res.end();

@@ -158,0 +173,0 @@ }

2

package.json
{
"name": "connect-concierge",
"version": "0.3.10",
"version": "0.3.11",
"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

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