How can I send multiple Set-Cookie headers from API Gateway using a proxied Lambda

后端 未结 5 2042
醉话见心
醉话见心 2021-01-17 09:40

I\'m using API Gateway\'s Proxy integration to call a Lambda. The output format specification is this follow JSON format:

{
  \"statusCode\": httpStatusCode,         


        
5条回答
  •  情书的邮戳
    2021-01-17 10:32

    As Mark B pointed out, you can/should achieve this by setting multiple cookie name/value pairs in a single Set-Cookie header. The browser should interpret this correctly.

    Cookie: a=1; b=2
    

    Edit: as pointed out by OP, there are use cases that require multiple instances of the header. We've added it our backlog along with supporting multiple header names on incoming requests.

提交回复
热议问题