Http-Proxy, like adapter, adds "/store-name" at the last of the proxy target that I specify.
I want to have complete control of the URL ,or atleast I should be able to add suffix to the url.
The file server/proxies/members.js
looks like this for me.
var proxyPath = '/members';
module.exports = function(app) {
// For options, see:
// https://github.com/nodejitsu/node-http-proxy
var proxy = require('http-proxy').createProxyServer({});
proxy.on('error', function(err, req) {
console.error(err, req.url);
});
app.use(proxyPath, function(req, res, next){
// include root path in proxied request
req.url = proxyPath + '/' + req.url;
proxy.web(req, res, { target: 'http://localhost:8082/connection/testdb?tablename=' });
});
};
As the final url is this case looks like
"http://localhost:8082/connection/testdb?tablename=/members/"
instead i want
P.S.: Is something like "buildURL=url" , possible in http-proxy