Open iliapisaniy opened 3 years ago
I Approve, It works
Can you explain what you are trying to achieve here?
when using it in conjuction with the cookie package in a project with nuxt ssr the first time it runs the plugin mentioned in the readme file throws an error because the req.headers.cookie is undefined, that cuses that the cookie.parse function throws an error since it is expecting a string not an undefined. I solved by just adding
if (process.server && req.headers.cookie)
that produces the same result as the solution in this request
What: Bug in case of using nuxt ssr plugin from
readme
Why:
How: Check type of cookie header and set to string if not
Checklist:
Issue #398