serverless-http icon indicating copy to clipboard operation
serverless-http copied to clipboard

Multiple `set-cookie` don't end up in the final response when an ALB is the trigger

Open rbhalla opened this issue 1 year ago • 0 comments

I am using this library (v3.2.0) with an Express (4.17.1) app.

I have two routes. First route sets a single set-cookie. The second route sets multiple set-cookies.

I can confirm that the headers are there on the response by doing the following:

module.exports.handler = serverless(app, {
  response(response) {
    console.log(response)
    return response
  }
})

I have multiValueHeaders set in my serverless.yml file since I know that can be an issue here.

For some reason, in the actual response, I don't see any set-cookie headers on the second endpoint, only the first.

I have switched to serverless-express since that seems to work in my case, but thought I'd post an issue here in case it trips anyone else up.

rbhalla avatar May 07 '23 22:05 rbhalla