Socket
Socket
Sign inDemoInstall

webhook-tunnel

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webhook-tunnel - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "webhook-tunnel",
"version": "1.0.0",
"version": "1.0.1",
"description": "A little HTTP proxy suitable to create tunnels for webhook endpoints protected behind a firewall or a VPN",

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

@@ -5,2 +5,3 @@ const { parse } = require('url')

const isInCidr = (remoteAddress) => (cidr) => {
console.log(cidr, remoteAddress)
const range = new Netmask(cidr)

@@ -23,4 +24,4 @@ return range.contains(remoteAddress)

if (options.expectCidr) {
if (!options.expectCidr.some(isInCidr(req.remoteAddress))) {
throw new Error(`Request rejected, remote address "${req.remoteAddress}" not in expected CIDRs list`)
if (!options.expectCidr.some(isInCidr(req.connection.remoteAddress))) {
throw new Error(`Request rejected, remote address "${req.connection.remoteAddress}" not in expected CIDRs list`)
}

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