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 2.0.18 to 2.0.19

33

dist/src/middleware/fronteggMiddleware.js

@@ -145,18 +145,23 @@ "use strict";

proxy.on('proxyReq', function (proxyReq, req, res, _) {
if (req.hostname) {
proxyReq.setHeader('frontegg-vendor-host', req.hostname);
}
if (req.body) {
var contentType = proxyReq.getHeader('Content-Type');
var contentLength = proxyReq.getHeader('Content-Length');
if (contentType && contentType.startsWith('multipart/form-data')) {
proxyReq.setHeader('Content-Type', contentType);
proxyReq.setHeader('Content-Length', contentLength);
return;
try {
if (req.hostname) {
proxyReq.setHeader('frontegg-vendor-host', req.hostname);
}
var bodyData = Buffer.isBuffer(req.body) ? req.body : JSON.stringify(req.body);
contentType = 'application/json';
contentLength = Buffer.byteLength(bodyData);
proxyReq.write(bodyData);
if (req.body) {
var contentType = proxyReq.getHeader('Content-Type');
var contentLength = proxyReq.getHeader('Content-Length');
if (contentType && contentType.startsWith('multipart/form-data')) {
proxyReq.setHeader('Content-Type', contentType);
proxyReq.setHeader('Content-Length', contentLength);
return;
}
var bodyData = Buffer.isBuffer(req.body) ? req.body : JSON.stringify(req.body);
contentType = 'application/json';
contentLength = Buffer.byteLength(bodyData);
proxyReq.write(bodyData);
}
}
catch (e) {
logger_1.default.error.apply(logger_1.default, ['could not proxy request to frontegg'].concat(e));
}
});

@@ -163,0 +168,0 @@ // tslint:disable-next-line:only-arrow-functions

{
"name": "@frontegg/client",
"version": "2.0.18",
"version": "2.0.19",
"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