AWS API CloudFront 后面的网关,转发 headers?
AWS API Gateway behind CloudFront, forwarding headers?
我有一个 API 网关,它是我创建的 CloudFront 分发背后的众多来源之一。我正在尝试将某些 header 转发到来源(主机、来源等)。当我不转发任何 header 时,请求会很好地到达 API 网关。但是,一旦我在 CloudFront 分配(全部或白名单)中启用 header 转发,API 网关就不再能够处理请求。我收到以下错误:
ERROR
The request could not be satisfied.
CloudFront wasn't able to connect to the origin.
有什么解决这个问题的建议吗?
如上所述,您不能将主机 header 转发到 API 网关源。没有主机 header,API 网关不知道正在调用什么 API。
我有一个 API 网关,它是我创建的 CloudFront 分发背后的众多来源之一。我正在尝试将某些 header 转发到来源(主机、来源等)。当我不转发任何 header 时,请求会很好地到达 API 网关。但是,一旦我在 CloudFront 分配(全部或白名单)中启用 header 转发,API 网关就不再能够处理请求。我收到以下错误:
ERROR
The request could not be satisfied.
CloudFront wasn't able to connect to the origin.
有什么解决这个问题的建议吗?
如上所述,您不能将主机 header 转发到 API 网关源。没有主机 header,API 网关不知道正在调用什么 API。