You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

express-request-proxy

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-request-proxy - npm Package Compare versions

Comparing version

to
1.2.0

3

lib/proxy.js

@@ -28,3 +28,4 @@ var _ = require('lodash'),

maxRedirects: 5,
gzip: true
gzip: true,
originalQuery: false
});

@@ -31,0 +32,0 @@

@@ -53,8 +53,14 @@ var parseUrl = require('url').parse;

// options take precedence.
requestOptions.url = formatUrl({
// If options.originalQuery is true, ignore the above and just
// use the original raw querystring as the search
requestOptions.url = formatUrl(_.extend({
protocol: parsedUrl.protocol,
host: parsedUrl.host,
pathname: pathname,
query: _.extend({}, querystring.parse(parsedUrl.query), req.query, options.query)
});
pathname: pathname
}, options.originalQuery ?
{search: req.url.replace(/^.+\?/, '')} :
{query: _.extend({}, querystring.parse(parsedUrl.query), req.query, options.query)}
));

@@ -61,0 +67,0 @@ requestOptions.headers = {};

{
"name": "express-request-proxy",
"version": "1.1.0",
"version": "1.2.0",
"description": "Intelligent http proxy Express middleware",

@@ -5,0 +5,0 @@ "main": "index.js",