且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

AWS API Gateway:使用302重定向和set-cookie标头

更新时间:2023-09-01 23:28:04

您是否更新了响应参数?

Did you update your Response Parameters?

在该博客文章中,请注意Swagger示例的responseParameters部分.

In that blog post notice the responseParameters section of the Swagger Example.

responseParameters:
          method.response.header.Location: "integration.response.body.location"

您需要向映射Set-Cookie参数的那一行添加另一行.像这样:

You need to add another line to that mapping the Set-Cookie parameter. Something like:

responseParameters:
          method.response.header.Location: "integration.response.body.location"
          method.response.header.Set-Cookie: "integration.response.body.setCookie"