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

fast-gateway

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-gateway - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

20

index.js

@@ -6,2 +6,3 @@ const fastProxy = require('fast-proxy')

const defaultProxyHandler = (req, res, url, proxy, proxyOpts) => proxy(req, res, url, proxyOpts)
const DEFAULT_METHODS = require('restana/libs/methods')

@@ -59,5 +60,18 @@ const gateway = (opts) => {

// registering route handler
const methods = route.methods || ['DELETE', 'GET', 'HEAD', 'PATCH', 'POST', 'PUT', 'OPTIONS']
server.route(methods, route.prefix + route.pathRegex, handler(route, proxy, proxyHandler), null, route.middlewares)
// registering route handlers
const methods = route.methods || DEFAULT_METHODS
methods.forEach(method => {
method = method.toLowerCase()
if (server[method]) {
server[method](
// path
route.prefix + route.pathRegex,
// route handler
handler(route, proxy, proxyHandler),
// route middlewares
route.middlewares
)
}
})
})

@@ -64,0 +78,0 @@

4

package.json
{
"name": "fast-gateway",
"version": "1.5.0",
"version": "1.5.1",
"description": "A Node.js API Gateway for the masses!",

@@ -31,3 +31,3 @@ "main": "index.js",

"http-cache-middleware": "^1.2.3",
"restana": "^3.4.0",
"restana": "^3.4.1",
"stream-to-array": "^2.3.0"

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