Huge News!Announcing our $40M Series B led by Abstract Ventures.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.2.3 to 1.2.4

18

dist/src/middleware/fronteggMiddleware.js

@@ -156,8 +156,18 @@ "use strict";

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);
// in case if content-type is application/x-www-form-urlencoded -> we need to change to application/json
proxyReq.setHeader('Content-Type', 'application/json');
proxyReq.setHeader('Content-Length', Buffer.byteLength(bodyData));
// stream the content
proxyReq.write(bodyData);
if (!contentLength || !contentType || contentType === 'application/x-www-form-urlencoded') {
contentType = 'application/json';
contentLength = Buffer.byteLength(bodyData);
proxyReq.write(bodyData);
}
proxyReq.setHeader('Content-Type', contentType);
proxyReq.setHeader('Content-Length', contentLength);
}

@@ -164,0 +174,0 @@ });

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