Socket
Socket
Sign inDemoInstall

http2-proxy

Package Overview
Dependencies
0
Maintainers
1
Versions
193
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.4 to 0.2.5

9

index.js

@@ -273,8 +273,7 @@ const http2 = require('http2')

proto: req.socket.encrypted ? 'https' : 'http',
// TODO: Is this correct?
for: [ req.socket.remoteAddress ]
for: `for=${req.socket.remoteAddress}`
}
if (req.headers[HTTP2_HEADER_FORWARDED]) {
const expr = /for=\s*([^\s]+)/i
const expr = /for=\s*([^\s]+)/ig
while (true) {

@@ -285,3 +284,3 @@ const m = expr.exec(req.headers[HTTP2_HEADER_FORWARDED])

}
fwd.for.push(m)
fwd.for += `; ${m[1]}`
}

@@ -292,3 +291,3 @@ }

`by=${fwd.by}`,
fwd.for.map(address => `for=${address}`).join('; '),
fwd.for,
fwd.host && `host=${fwd.host}`,

@@ -295,0 +294,0 @@ `proto=${fwd.proto}`

{
"name": "http2-proxy",
"version": "0.2.4",
"version": "0.2.5",
"scripts": {

@@ -5,0 +5,0 @@ "dev": "nodemon --inspect=9308 --expose-http2 src",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc