gulp-webserver
gulp-webserver copied to clipboard
Problem on redirect of the proxy
If the proxy needs a redirect the system makes a wrong redirect. Example:
target: http://xxxx/bill source: /bill original redirect http://xxxx/bill/v1/... calculated redirect: //v1/...
The problem is that proxy-middleware needs options.route valued on the redirect. A working solution is to modify index.js at the line 149
app.use(config.proxies[i].source, proxy(proxyoptions));
as follow
proxyoptions.route = config.proxies[i].source; app.use(proxy(proxyoptions));
Ciao Angelo
I tried you solution, but it didn't worked. So I replaced "proxies" section with "middleware" and used "http-proxy-middleware"