Closed kylemod closed 3 years ago
$cookies.set('token', 'apikey') = works on client
$cookies.set('token', 'apikey')
$cookies.set('token','apikey', { httpOnly: true} ) = doesn't work in client
$cookies.set('token','apikey', { httpOnly: true} )
And it works on server like nuxtServerInit
nuxtServerInit
Hi @kylemod, you can't set, edit or delete a cookie that has httpOnly set to true. That is a browser security limitation. A httpOnly cookie can only be set server side. Hope this answer your question.
httpOnly
$cookies.set('token', 'apikey')
= works on client$cookies.set('token','apikey', { httpOnly: true} )
= doesn't work in clientAnd it works on server like
nuxtServerInit