Cookies doesn't process
When I try to run in my middleware the following
the result I get is
undefined
, then randomly after a while when I rerun it shows the cookie, but the cookie never allowed to be deleted or changed and always stays the same.2 Replies
I don’t know HTTP, but I think
setCookie
append your value to Set-Cookie
header for the browser. You might want to use some sort of context.Found the issue now, I returned
return new Response(null, { status: 204 })
and for resulted in this issue.
as I need to set the headers alongside the status for it to work.
solution is to use return c.body('', 204)