Set cookie header in procedure middleware
Hi,
I am trying to set the cookie header in my middleware "protected route" eg. whenever I decide user shouldn't be authorized anymore I would like to clear the cookie by setting
set-cookie with max-age 0.
My protectedProcedure looks like this:
Is there anything I should be doing differently? Thanks in advance for any help.Solution:Jump to solution
It seems, that everything works as expected.
The problem was with the Bun lambda runtime where it didn't correctly returned cookies which caused 502 error. The fix is already in pull request here https://github.com/oven-sh/bun/pull/21018...
GitHub
fix(bun-lambda): Resolve 502 error when setting cookies with HTTP A...
What does this PR do?
This PR fixes an issue in the bun-lambda package(noted in this issue #20760 ), specifically within the runtime.ts where responses containing cookies would cause a 502 Bad Gate...
1 Reply
Solution
It seems, that everything works as expected.
The problem was with the Bun lambda runtime where it didn't correctly returned cookies which caused 502 error. The fix is already in pull request here https://github.com/oven-sh/bun/pull/21018
GitHub
fix(bun-lambda): Resolve 502 error when setting cookies with HTTP A...
What does this PR do?
This PR fixes an issue in the bun-lambda package(noted in this issue #20760 ), specifically within the runtime.ts where responses containing cookies would cause a 502 Bad Gate...