http2-proxy
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"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')) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36844