我在我的 PHP EC2 服务器上使用 OAuth2。
从我托管在 S3 中的前端客户端,我向我的 ElasticBeanstalk EC2 服务器发出请求(前端和后端都通过带有 SSL 证书的 Cloudfront 提供服务)。
这些请求与所需的访问 token header 一起发送,如 Authorization: header ...
当我收到错误时,Cloudfront 似乎删除了这些 header :
error_description: "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter."
我正在尝试按照 this documentation 的指示通过 Cloudfront 将此 header “列入白名单”但觉得很困惑。我实际上可以在 Cloudfront 的何处添加
Authorization
标题接受?部分文档说:
You can configure each cache behavior in a web distribution to do one of the following:
- Forward all headers to your origin
但是我在设置时已经这样做了:
最佳答案
关于amazon-web-services - Cloudfront 中的白名单授权 header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52827824/