blob: 881c6248a4bd772bdcd45d497d5f5ec8b334169f [file] [log] [blame]
module.exports = {
devServer: {
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;
}
}
}
}
}
};