Nuxt session middleware to get a persistent session per app user, e.g., to store data across multiple requests. The nuxt session module provides the useSession() composable out of the box and sets up API endpoints to interact with your session to make working with sessions feel like a breeze.
As it seems like, there is a bug in resetting a session when the IP is pinned.
There should be some way of error handling when it comes to the above described case.
Additional context
No response
Logs
[nitro] [dev] [unhandledRejection] Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at new NodeError (node:internal/errors:371:5)
at ServerResponse.setHeader (node:_http_outgoing:576:11)
at appendResponseHeader (file:///Users/IronicUsername/Development/personal/nuxt-session/node_modules/h3/dist/index.mjs:280:13)
at setCookie (file:///Users/IronicUsername/Development/personal/nuxt-session/node_modules/h3/dist/index.mjs:341:3)
at deleteCookie (file:///Users/IronicUsername/Development/personal/nuxt-session/node_modules/h3/dist/index.mjs:344:3)
at deleteSession (file:///Users/IronicUsername/Development/personal/nuxt-session/playground/.nuxt/dev/index.mjs:543:3)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async getSession (file:///Users/IronicUsername/Development/personal/nuxt-session/playground/.nuxt/dev/index.mjs:579:5)
at async ServerResponse.<anonymous> (file:///Users/IronicUsername/Development/personal/nuxt-session/playground/.nuxt/dev/index.mjs:599:21) {
code: 'ERR_HTTP_HEADERS_SENT'
}
Environment
Darwin
v16.14.2
3.0.0-rc.12
0.6.0
npm@8.5.0
vite
-
-
-
Reproduction
Set the
ipPinning
totrue
here and eitherDELETE
the session andREFRESH
the sessionRESET
the sessionboth actions where performed on the playground.
Describe the bug
As it seems like, there is a bug in resetting a session when the IP is pinned. There should be some way of error handling when it comes to the above described case.
Additional context
No response
Logs