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 1.0.1 to 1.0.2

4

index.js

@@ -29,5 +29,3 @@ const HttpProxy = require('http-proxy');

if (options.event && typeof options.event === 'object') {
this.handle(proxyServer, options.event);
}
this.handle(proxyServer, options.event);

@@ -34,0 +32,0 @@ proxyServer.web(ctx.req, ctx.res, options, e => {

{
"name": "koa2-nginx",
"version": "1.0.1",
"version": "1.0.2",
"description": "This is an http-proxy based egg proxy middleware that can be used after bodyparse",

@@ -51,3 +51,6 @@ "main": "index.js",

"moment": "^2.22.2"
},
"engines": {
"node": ">=8.0.0"
}
}

@@ -58,6 +58,2 @@ # koa2-nginx

- `rewrite`
rewrites the url redirects.unrequired,Funtion, default `path.replace(context, '')`
- `proxies`

@@ -114,3 +110,3 @@ koa-ngnix important parameter,required,expect get array,Each of the internal objects is a proxy combination, and some of the internal parameters can override globally parameters of the same name.

logs: false,
rewrite: path => path.rewrite('api', 'rewriteApi'),
rewrite: path => path.replace('api', 'rewriteApi'),
proxyTimeout: 10000,

@@ -117,0 +113,0 @@ },

@@ -23,3 +23,3 @@ const packageInfo = require('../package.json');

// handle event:proxyReq、proxyRes、error
handle(proxyServer, event) {
handle(proxyServer, event = {}) {
const { handleReq, handleRes, handleError } = event;

@@ -26,0 +26,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