@frontegg/client
Advanced tools
Comparing version 1.0.19 to 1.0.20
@@ -117,2 +117,12 @@ "use strict"; | ||
}); }); | ||
proxy.on('proxyReq', function (proxyReq, req, res, options) { | ||
if (req.body) { | ||
var bodyData = JSON.stringify(req.body); | ||
// incase 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); | ||
} | ||
}); | ||
return function (req, res) { | ||
@@ -119,0 +129,0 @@ return __awaiter(this, void 0, void 0, function () { |
{ | ||
"name": "@frontegg/client", | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"description": "Frontegg Javascript Library for backend", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -61,2 +61,13 @@ import { FronteggAuthenticator } from '../authenticator' | ||
proxy.on('proxyReq', (proxyReq, req: any, res, options) => { | ||
if (req.body) { | ||
let bodyData = JSON.stringify(req.body); | ||
// incase 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); | ||
} | ||
}); | ||
return async function (req, res) { | ||
@@ -63,0 +74,0 @@ const context = await options.contextResolver(req) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59884
1247