Open ml27299 opened 1 year ago
I think the problem is in these lines:
But this problem is not that simple to solve, as laverdet describes in this issue: https://github.com/vendia/serverless-express/issues/554
For sure, the strategy of handling cookies needs to be evaluated again to be more resilient, I think the solution of stack overflow could be one possible solution for this problem.
What you can do now is maybe try activating the option of multiValueHeaders
inside AWS ALB. This will lead to the problem of reverse cookie order but at least the cookie will be set.
When you set multiple cookies it only sets the first one. I have an application that has a csrf middleware, it one of the first middleware to be initialized. My app has a route where a we set a token then redirect to another page in the app, whats happening is the csrf middleware runs before the route function handler. The middleware sets a cookie, then the route function runs sets another cookie, then a redirect happens.
SERVERLESS_EXPRESS:FORWARD_REQUEST_TO_NODE_SERVER:RESPONSE