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

http2-proxy

Package Overview
Dependencies
Maintainers
1
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http2-proxy - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

3

package.json
{
"name": "http2-proxy",
"version": "0.1.2",
"version": "0.1.3",
"scripts": {
"build": "babel src --out-dir dist --source-maps",
"start": "node -r babel-register src",
"preversion": "babel src --out-dir dist --source-maps",
"dev": "nodemon -r babel-register --inspect=9308 --expose-http2 src",

@@ -8,0 +9,0 @@ "precommit": "standard",

@@ -64,11 +64,11 @@ # node-http2-proxy

port: 9000,
onRes: (req, headers) => helmet({
onRes: (req, resHeaders) => helmet({
setHeader (key, val) {
headers[key.trim().toLowerCase()] = val
resHeaders[key.trim().toLowerCase()] = val
},
getHeader (key) {
return headers[key.trim().toLowerCase()]
return resHeaders[key.trim().toLowerCase()]
},
removeHeader (key) {
delete headers[key.trim().toLowerCase()]
delete resHeaders[key.trim().toLowerCase()]
}

@@ -87,6 +87,6 @@ }, () => {})

port: 9000,
onReq: (req, headers) => {
headers['x-forwarded-for'] = req.socket.remoteAddress
headers['x-forwarded-proto'] = req.socket.encrypted ? 'https' : 'http'
headers['x-forwarded-host'] = req.headers['host']
onReq: (req, reqHeaders) => {
reqHeaders['x-forwarded-for'] = req.socket.remoteAddress
reqHeaders['x-forwarded-proto'] = req.socket.encrypted ? 'https' : 'http'
reqHeaders['x-forwarded-host'] = req.headers['host']
}

@@ -93,0 +93,0 @@ }, err => console.error(err, 'proxy error'))

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