client: proxy requests to real api

This commit is contained in:
Matteo Pagliazzi
2016-09-21 14:43:50 +02:00
parent bde01c30ad
commit ed1f0a04ae
2 changed files with 8 additions and 2 deletions

View File

@@ -24,7 +24,13 @@ module.exports = {
assetsSubDirectory: 'static',
assetsPublicPath: '/',
staticAssetsDirectory: staticAssetsDirectory,
proxyTable: {},
proxyTable: {
// proxy all requests starting with /api/v3 to localhost:3000
'/api/v3': {
target: 'http://localhost:3000',
changeOrigin: true,
},
},
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)