Is there an AWS inbound policy that interferes with “Authorization: Bearer {token}” data? [duplicate]

谁说胖子不能爱 提交于 2020-08-10 20:22:17

问题


The question above is the thread associated with these links. Link 1, Link 2

It's like this when I understand my current situation.

Request.user cannot be identified from EC2 instance created via AWS EB. The reason is that the Authorization: Bearer {token} provided during data communication is not being delivered to the EC2 instance.

However, this issue only occurs within AWS instances. With the same code, Authorization data is correctly passed in local, and it is also correctly passed in GCP Compute instance.

I think it's an environmental issue in AWS, but is there something I should look at?


回答1:


So I did some digging in the AWS forums and this does seem to be a known "issue". Looks like there is a a fix:

in .ebextensions/wsgihacks.config:

files:
  "/etc/httpd/conf.d/wsgihacks.conf":
    mode: "000644"
    owner: root
    group: root
    content: |
      WSGIPassAuthorization on

Original thread: https://forums.aws.amazon.com/message.jspa?messageID=376244



来源:https://stackoverflow.com/questions/62686560/is-there-an-aws-inbound-policy-that-interferes-with-authorization-bearer-toke

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!