Kri*_*ian 5 amazon-cloudfront aws-lambda aws-api-gateway
我有一个 CloudFront 分配,abcd1234.cloudfront.net并且我已经向分配中添加了一个自定义域mysite.com。
aaabbbccc.execute-api.us-east-1.amazonaws.commysite.com/hello/world,CloudFront 正在使用 API Gatewayaaabbbccc.execute-api.us-east-1.amazonaws.com/prod/{proxy+}getPageContent(customDomainName, pagePath) which should be mysite.com and /hello/world respectively.Host header that eventually makes it into the function's event.headers.Host value is never the custom domain. Instead, the Host header is always aaabbbccc.execute-api.us-east-1.amazonaws.com.I want headers.Host to equal mysite.com (or another header to show that the request comes from mysite.com, but no matter what I do, the Host value is always just the origin url.
Edit: I tried whitelisting Host and it caused the site to break completely, with the error about not being able to reach the CloudFront distribution.
| 归档时间: |
|
| 查看次数: |
953 次 |
| 最近记录: |