dvonlehman / express-request-proxy

Advanced streaming http request proxy middleware for Express with support for custom routes, caching, and response transforms.
96 stars 38 forks source link

Array as query params sent as string when only one item #55

Open lionep opened 3 years ago

lionep commented 3 years ago

When using queries like /myroute?values[]=1 through the middleware, the backend server receive as query values=1 instead of values[]=1

Example with backend :

app.get('/*', (req, res) => {
  res.json({
    url: req.url
  });
});

Request in direct :

curl -g "localhost:8080/sample?values[]=1"
# {"url": "/az?toto[]=1"}

Request through middleware

curl -g "localhost:8081/sample?values[]=1"
# {"url": "/az?toto=1"}