Node.js Amazon API网关忽略来自后端API的设置cookie

Node.js Amazon API网关忽略来自后端API的设置cookie,node.js,session,amazon-web-services,cookies,aws-api-gateway,Node.js,Session,Amazon Web Services,Cookies,Aws Api Gateway,我试图使用AmazonAPI网关设置http代理,但api网关忽略了来自后端api的SETcookie请求。我还尝试将“integration.response.header.setcookie”作为网关中“setcookie”的映射 我必须遵循什么设置,以便网关不会过滤掉任何标头请求参数,如set cookie&cookieAPI网关不会过滤请求或响应上的cookie或set cookie标头。您应该能够将这些头代理到端点,然后再代理回来,而不会出现问题 但是,cookie头可能会被API网关

我试图使用AmazonAPI网关设置http代理,但api网关忽略了来自后端api的SETcookie请求。我还尝试将“integration.response.header.setcookie”作为网关中“setcookie”的映射


我必须遵循什么设置,以便网关不会过滤掉任何标头请求参数,如set cookie&cookie

API网关不会过滤请求或响应上的cookie或set cookie标头。您应该能够将这些头代理到端点,然后再代理回来,而不会出现问题

但是,cookie头可能会被API网关控制台中的“test invoke”函数或您可能正在使用的测试客户端过滤掉

要确认,请使用受支持的客户端(如curl)对部署的API进行测试。i、 e

curl -v "https://h8q79qwil5.execute-api.us-east-1.amazonaws.com/test"
*   Trying 52.84.24.209...
* Connected to h8q79qwil5.execute-api.us-east-1.amazonaws.com (52.84.24.209) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.execute-api.us-east-1.amazonaws.com
* Server certificate: Symantec Class 3 Secure Server CA - G4
* Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5
> GET /test HTTP/1.1
> Host: h8q79qwil5.execute-api.us-east-1.amazonaws.com
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 181
< Connection: keep-alive
< Date: Mon, 11 Jul 2016 22:36:21 GMT
< Cookie: foobar
< Set-Cookie: set-cookie!
< x-amzn-RequestId: e40c57d1-47b7-11e6-b175-2f2f5356f0d7
< X-Cache: Miss from cloudfront
< Via: 1.1 ce270f4a88edde7438864bc44406e83a.cloudfront.net (CloudFront)
< X-Amz-Cf-Id: BRoLbquwa2ZkOwxDcEOJQ-iheYa90AM4WkT2gZr3TUgLlBIvUijZAg==
curl-v”https://h8q79qwil5.execute-api.us-east-1.amazonaws.com/test"
*正在尝试52.84.24.209。。。
*连接到h8q79qwil5.execute-api.us-east-1.amazonaws.com(52.84.24.209)端口443(#0)
*使用TLS_ECDHE_RSA_和_AES_128_GCM_SHA256的TLS 1.2连接
*服务器证书:*.execute-api.us-east-1.amazonaws.com
*服务器证书:赛门铁克3级安全服务器CA-G4
*服务器证书:VeriSign 3级公共主证书颁发机构-G5
>获取/测试HTTP/1.1
>主机:h8q79qwil5.execute-api.us-east-1.amazonaws.com
>用户代理:curl/7.43.0
>接受:*/*
>
谢谢, 瑞安