Comparing version 2.0.0 to 2.1.0
@@ -20,3 +20,10 @@ 'use strict' | ||
return function (request, response) { | ||
if (request.url.substring(0, 5) === '/api/') { | ||
var uriPrefix = request.url.substring(0, 5) | ||
if (uriPrefix === '/ping') { | ||
response.writeHead(200, {'content-length': 4, 'content-type': 'text/plain'}) | ||
return response.end('PONG') | ||
} | ||
if (uriPrefix === '/http') { | ||
request.url = '/' + request.url | ||
} else if (opts.enableAPI && uriPrefix === '/api/') { | ||
var query = parseURL(request.url, true).query | ||
@@ -23,0 +30,0 @@ if (opts.requireKey && opts.requireKey !== query.key) return res404(response) |
{ | ||
"name": "bfn-proxy", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "HTTP request proxy middleware for node.js", | ||
@@ -5,0 +5,0 @@ "author": "Blue Fidelity Inc. (https://www.bluefidelity.com/)", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12790
167
2