solr-proxy
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -0,1 +1,13 @@ | ||
2.1.2 | ||
===== | ||
* Update dependencies includeing security fixes. Please update! | ||
2.1.1 | ||
===== | ||
* Fix CLI. Shipped without a required library. Whoops. Testing didn't catch it | ||
because the required library was in `node_modules` due to a testing | ||
dependency. Ooooooffffff. | ||
2.1.0 | ||
@@ -2,0 +14,0 @@ ===== |
10
index.js
@@ -0,3 +1,3 @@ | ||
var { URL } = require('url') | ||
var httpProxy = require('http-proxy') | ||
var url = require('url') | ||
var extend = require('xtend') | ||
@@ -14,5 +14,5 @@ var debug = require('debug')('solr-proxy') | ||
var validateRequest = function (request, options) { | ||
var parsedUrl = url.parse(request.url, true) | ||
var parsedUrl = new URL(request.url, 'https://www.example.com/') | ||
var path = parsedUrl.pathname | ||
var queryParams = Object.keys(parsedUrl.query) | ||
var queryParams = Array.from(parsedUrl.searchParams) | ||
@@ -22,3 +22,3 @@ return options.validHttpMethods.indexOf(request.method) !== -1 && | ||
queryParams.every(function (p) { | ||
var paramPrefix = p.split('.')[0] // invalidate not just "stream", but "stream.*" | ||
var paramPrefix = p[0].split('.')[0] // invalidate not just "stream", but "stream.*" | ||
return options.invalidParams.indexOf(paramPrefix) === -1 | ||
@@ -40,3 +40,3 @@ }) | ||
var createServer = function (options) { | ||
var proxy = httpProxy.createProxyServer({target: options.backend}) | ||
var proxy = httpProxy.createProxyServer({ target: options.backend }) | ||
@@ -43,0 +43,0 @@ proxy.on('error', function (err, req, res) { |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"author": "Rich Trott <rtrott@gmail.com>", | ||
@@ -18,3 +18,3 @@ "bugs": { | ||
"scripts": { | ||
"test": "standard && lab -t 100 test" | ||
"test": "standard && dependency-check --no-dev package.json && lab -t 100 test" | ||
}, | ||
@@ -35,17 +35,17 @@ "bin": { | ||
"dependencies": { | ||
"debug": "^3.1.0", | ||
"http-proxy": "^1.10.1", | ||
"debug": "^4.1.1", | ||
"http-proxy": "^1.18.0", | ||
"minimist": "^1.2.0", | ||
"xtend": "^4.0.0" | ||
"xtend": "^4.0.2" | ||
}, | ||
"devDependencies": { | ||
"code": "^5.2.0", | ||
"lab": "^15.5.0", | ||
"request": "^2.86.0", | ||
"standard": "^11.0.1" | ||
"@hapi/lab": "^22.0.4", | ||
"code": "^5.2.4", | ||
"dependency-check": "^4.1.0", | ||
"standard": "^14.3.1" | ||
}, | ||
"engines": { | ||
"node": ">=8.11.2" | ||
"node": ">=10.18.0" | ||
}, | ||
"license": "MIT" | ||
} |
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
10386
+ Addeddebug@4.3.7(transitive)
- Removeddebug@3.2.7(transitive)
Updateddebug@^4.1.1
Updatedhttp-proxy@^1.18.0
Updatedxtend@^4.0.2