diff options
Diffstat (limited to 'vue.config.js')
-rw-r--r-- | vue.config.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/vue.config.js b/vue.config.js index c4175951..881c6248 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,19 @@ module.exports = { devServer: { - proxy: process.env.BASE_URL + proxy: { + "/": { + target: process.env.BASE_URL, + onProxyRes: proxyRes => { + if (proxyRes.headers["set-cookie"]) { + // Need to remove 'Secure' flag on set-cookie value so browser + // can create cookie for local development + const cookies = proxyRes.headers["set-cookie"].map(cookie => + cookie.replace(/; secure/gi, "") + ); + proxyRes.headers["set-cookie"] = cookies; + } + } + } + } } }; |