AWS Elastic Beanstalk:HTTP标题不会出现在Flask应用程序中 [英] AWS Elastic Beanstalk: HTTP Header not appearing in Flask application
问题描述
我有一个小的Flask应用程序,我想在AWS Elastic Beanstalk上运行。
应用程序部署并运行良好,但是我注意到一个自定义的HTTP Header (HTTP_CUSTOM_TOKEN)不存在于 request.headers
中。
我假设我从Apache配置中丢失了一些东西,但是对这个环境不是很熟悉。
你需要的是类似于@Fartash所建议的,只是略有不同。
添加 .ebextensions / python.config
:
container_commands:
03wsgipass:
command:'echo'WSGIPassAuthorization On>> ../wsgi.conf'
在使用AWS Elastic Beanstalk Python平台
I have a small Flask application that I want to run on AWS Elastic Beanstalk.
The application deploys and runs fine but I've noticed that a custom HTTP Header (HTTP_CUSTOM_TOKEN) is not present in request.headers
.
I'm assuming I'm missing something from the Apache configuration but am not very familiar with that environment.
What you need is something similar to what @Fartash suggested, just slightly different.
Add .ebextensions/python.config
:
container_commands:
03wsgipass:
command: 'echo "WSGIPassAuthorization On" >> ../wsgi.conf'
as explained at Using the AWS Elastic Beanstalk Python Platform
这篇关于AWS Elastic Beanstalk:HTTP标题不会出现在Flask应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!