New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@frontegg/client

Package Overview
Dependencies
Maintainers
1
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontegg/client - npm Package Compare versions

Comparing version 1.1.4 to 1.2.0

1

dist/src/middleware/index.d.ts

@@ -19,2 +19,3 @@ /// <reference types="node" />

disableCors?: boolean;
cookieDomainRewrite?: string;
}

@@ -21,0 +22,0 @@ export declare function frontegg(options: IFronteggOptions): (req: any, res: any) => Promise<any>;

@@ -52,2 +52,11 @@ "use strict";

}
function rewriteCookieDomain(header, oldDomain, newDomain) {
if (Array.isArray(header)) {
return header.map(function (headerElement) {
return rewriteCookieDomain(headerElement, oldDomain, newDomain);
});
}
return header.replace(new RegExp("(;\\s*domain=)" + oldDomain + ";", 'i'), "$1" + newDomain + ";");
}
;
function proxyRequest(req, res, context) {

@@ -229,3 +238,3 @@ return __awaiter(this, void 0, void 0, function () {

proxy.on('proxyRes', function (proxyRes, req, res) { return __awaiter(_this, void 0, void 0, function () {
var context;
var context, host_1;
return __generator(this, function (_a) {

@@ -257,3 +266,12 @@ switch (_a.label) {

return [2 /*return*/, proxyRequest(req, res, context)];
case 3: return [2 /*return*/];
case 3:
if (options.cookieDomainRewrite) {
host_1 = req.headers.host;
Object.keys(proxyRes.headers).forEach(function (key) {
if (key.toLowerCase() === 'set-cookie') {
proxyRes.headers[key] = rewriteCookieDomain(proxyRes.headers[key], host_1, options.cookieDomainRewrite);
}
});
}
return [2 /*return*/];
}

@@ -260,0 +278,0 @@ });

2

package.json
{
"name": "@frontegg/client",
"version": "1.1.4",
"version": "1.2.0",
"description": "Frontegg Javascript Library for backend",

@@ -5,0 +5,0 @@ "main": "dist/index.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