From ed1f0a04ae92c29d382bccda564e2717c5e173aa Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Wed, 21 Sep 2016 14:43:50 +0200 Subject: [PATCH] client: proxy requests to real api --- webpack/config/index.js | 8 +++++++- website/client/main.js | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/webpack/config/index.js b/webpack/config/index.js index 6f7123be57..a6d5474490 100644 --- a/webpack/config/index.js +++ b/webpack/config/index.js @@ -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) diff --git a/website/client/main.js b/website/client/main.js index a42b2c4a48..d2024e22ac 100644 --- a/website/client/main.js +++ b/website/client/main.js @@ -16,4 +16,4 @@ new Vue({ // eslint-disable-line no-new store, el: '#app', render: h => h(App), -}); +}); \ No newline at end of file