Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa2-nginx

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa2-nginx - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

8

lib/index.js

@@ -43,3 +43,7 @@ const httpProxyMiddleware = require('http-proxy-middleware');

if (req.koaReq.body) {
// https://github.com/koajs/bodyparser#raw-body
if (
Object.keys(req.koaReq.body).length ||
(req.koaReq.body && req.koaReq.rawBody)
) {
const contentType = proxyReq.getHeader('Content-Type');

@@ -100,3 +104,3 @@ let bodyData;

if (proxyConfig.autoProcessReqBody && proxyConfig.onProxyReq) {
if (proxyConfig.autoProcessReqBody) {
proxyConfig.onProxyReq = wraperProxyReqHandler(proxyConfig.onProxyReq);

@@ -103,0 +107,0 @@ }

{
"name": "koa2-nginx",
"version": "2.0.1",
"version": "2.0.2",
"description": "This is an http-proxy koa proxy middleware that can be used after bodyparse",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -107,3 +107,6 @@ const expect = require('expect.js');

koaReq: {
body: { a: 1 }
body: {
a: 1
},
rawBody: '{\n "a": 1\n}'
}

@@ -128,3 +131,4 @@ };

koaReq: {
body: 'a=1'
body: 'a=1',
rawBody: 'a=1'
}

@@ -131,0 +135,0 @@ };

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