From c55c0ce9c7d0953dc8d53be01ccb906a5f18cab8 Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Sun, 9 Oct 2016 16:39:51 +0300 Subject: [PATCH] Fix proxy settings to be able to proxy to dev.account --- config/template.dev.json | 2 +- webpack.config.js | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/config/template.dev.json b/config/template.dev.json index 0e6318a..3505bf7 100644 --- a/config/template.dev.json +++ b/config/template.dev.json @@ -1,3 +1,3 @@ { - "apiHost": "http://account.l" + "apiHost": "https://dev.account.ely.by" } diff --git a/webpack.config.js b/webpack.config.js index f59186d..a7b3723 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -254,11 +254,9 @@ if (!isProduction && !isTest) { host: 'localhost', port: 8080, proxy: { - '/api*': { - headers: { - host: config.apiHost.replace(/https?:|\//g, '') - }, - target: config.apiHost + '/api': { + target: config.apiHost, + changeOrigin: true // add host http-header, based on target } }, hot: true,