On the Issue of Missing Request Parameters Caused by Using pipe in express

  node.js, question

My middleware configuration in app.js

 app.use(bodyParser.urlencoded({ extended: false }));

The following is the code for proxy:

var request = require('request');
 var config = require('../config');
 const URL_TO_PROXY = [
 const PROXY_BASE_URL = config.proxyBaseUrl;
 exports.filter = function(req,res,next) {
 if (URL_TO_PROXY.indexOf(req.path) !  = -1) {
 Varrequirl = proxy _ base _ url plus req.path;
 req.pipe(request(reqUrl,function(error,response,body) {
 //console.log ('data returned by proxy', body);
 } else {

The current server architecture is such that the browser requests servers A, A to proxy access server B through pipe.
I found that after using req.pipe, server b could not receive the parameters in the request, for example, I requested /user/head/get at the front end? The address id=1 cannot be obtained at all on server b.

Change this sentence: var reqUrl = PROXY_BASE_URL plus req.path; Add req.originalUrl to varrequire = proxy _ base _ url; Problem solving