What problem does this feature solve?
I have a serverMiddleware with a cookie parser with an internal API (with express).
// Export the server middleware
export default {
path: '/api',
handler: app
}
All work fine client side but when axios request is trigerred server side, axios doesn't add set-cookie. I have to do:
$axios.onResponse((resp) => {
if(resp.headers['set-cookie'] && process.server){
try{
res.setHeader('Set-Cookie', [ resp.headers['set-cookie'] ])
}catch(e) {}
}
return resp
})
Why ?
This feature request is available on Nuxt community (#c131)
What problem does this feature solve?
I have a serverMiddleware with a cookie parser with an internal API (with express).
// Export the server middleware
All work fine client side but when axios request is trigerred server side, axios doesn't add set-cookie. I have to do:
Why ?