nuxt-session
nuxt-session copied to clipboard
`ERR_HTTP_HEADERS_SENT`
Environment
- Operating System:
Darwin
- Node Version:
v16.14.2
- Nuxt Version:
3.0.0-rc.12
- Nitro Version:
0.6.0
- Package Manager:
[email protected]
- Builder:
vite
- User Config:
-
- Runtime Modules:
-
- Build Modules:
-
Reproduction
Set the ipPinning
to true
here and either
-
DELETE
the session andREFRESH
the session -
RESET
the session
both 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
[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'
}