gulp-server-livereload
gulp-server-livereload copied to clipboard
How to connect middleware using proxy ? The way is described in document is not working.
I'm excepting to forward api request to given target.
server({
livereload: {
enable: true,
port: 35730,
defaultFile:"index.html",
filter: function (filePath, cb) {
log(chalk.blue.bgGreen.bold(filePath));
cb(!(/node_modules/.test(filePath)));
}
},
open: true,
port: 9090,
proxies : [{source: '/nflGame', target:'http://10.21.36.15:8080/nflGame',options: {headers: {'ABC_HEADER': 'abc'}}}]
})
+1, I'm having exactly the same issue. Any ideas what's causing this?
My bad, wasn't passing it as an Array!
@AntonRand could you share an example?
@j0gurt Check out the example at the top!
for my requirement i have use browserSync to solve problem. That support multiple proxy forward. https://www.browsersync.io/docs/options