Comparing version 1.3.4 to 1.3.5
@@ -12,3 +12,3 @@ 'use strict' | ||
var omitHeaders = ['request', 'host', 'connection', 'x-forwarded-for', 'x-forwarded-proto', 'x-forwarded-port', 'x-request-start', 'x-request-id'] | ||
if (typeof opts['omitHeaders'] === 'undefined') omitHeaders = omitHeaders.concat(['cookie', 'origin', 'referer', 'via']) | ||
if (typeof opts['omitHeaders'] === 'undefined') omitHeaders = omitHeaders.concat(['cookie', 'origin', 'referer', 'via', 'upgrade-insecure-requests']) | ||
else if (Array.isArray(opts['omitHeaders'])) omitHeaders = omitHeaders.concat(opts['omitHeaders']) | ||
@@ -54,4 +54,4 @@ return function (request, response) { | ||
if (opts.enableCORS && request.headers.origin) res.headers['access-control-allow-origin'] = '*' | ||
res.headers['X-Bfs-Responseurl'] = (request.headers['x-forwarded-proto'] || 'http') + '://' + request.headers.host + '//http' + (scheme === 'http' ? '' : 's') + ':' + options.href | ||
if ((res.statusCode >= 200 && res.statusCode <= 299) || res.statusCode === 304) { | ||
res.headers['X-Bfs-Responseurl'] = (request.headers['x-forwarded-proto'] || 'http') + '://' + request.headers.host + '//http' + (scheme === 'http' ? '' : 's') + ':' + options.href | ||
response.writeHead(res.statusCode, res.headers) | ||
@@ -58,0 +58,0 @@ res.pipe(response, {end: true}) |
{ | ||
"name": "bfn-proxy", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"description": "HTTP request proxy middleware for node.js", | ||
@@ -5,0 +5,0 @@ "author": "Blue Fidelity Inc. (https://www.bluefidelity.com/)", |
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
11020