forked from Ivasoft/traefik
feat(Dev proxy) : Add proxy to localhost:8080 in dev mode.
This commit is contained in:
committed by
Fernandez Ludovic
parent
b24b5e20b4
commit
61ba50fac9
@@ -1,4 +1,15 @@
|
||||
const conf = require('./gulp.conf');
|
||||
const proxy = require('http-proxy-middleware');
|
||||
|
||||
const apiProxy = proxy('/api', {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true
|
||||
});
|
||||
|
||||
const healthProxy = proxy('/health', {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true
|
||||
});
|
||||
|
||||
module.exports = function () {
|
||||
return {
|
||||
@@ -6,6 +17,10 @@ module.exports = function () {
|
||||
baseDir: [
|
||||
conf.paths.tmp,
|
||||
conf.paths.src
|
||||
],
|
||||
middleware: [
|
||||
apiProxy,
|
||||
healthProxy
|
||||
]
|
||||
},
|
||||
open: false
|
||||
|
||||
Reference in New Issue
Block a user