File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 11option_settings:
22 aws:elasticbeanstalk:container:python:
33 WSGIPath: application:application
4+ aws:elasticbeanstalk:application:environment:
5+ PORT: 8000
6+ aws:elasticbeanstalk:environment:proxy:
7+ ProxyServer: nginx
8+ aws:elasticbeanstalk:environment:process:default:
9+ Port: 8000
10+ Protocol: HTTP
11+
12+ files:
13+ "/etc/nginx/conf.d/proxy.conf":
14+ mode: "000644"
15+ owner: root
16+ group: root
17+ content: |
18+ upstream backend {
19+ server 127.0.0.1:8000;
20+ }
21+
22+ server {
23+ listen 80;
24+
25+ location / {
26+ proxy_pass http://backend;
27+ proxy_set_header Host $host;
28+ proxy_set_header X-Real-IP $remote_addr;
29+
30+ if ($request_method = 'OPTIONS') {
31+ add_header 'Access-Control-Allow-Origin' '*';
32+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
33+ add_header 'Access-Control-Allow-Headers' '*';
34+ add_header 'Content-Type' 'text/plain charset=UTF-8';
35+ add_header 'Content-Length' 0;
36+ return 204;
37+ }
38+
39+ add_header 'Access-Control-Allow-Origin' '*' always;
40+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
41+ add_header 'Access-Control-Allow-Headers' '*' always;
42+ }
43+ }
Original file line number Diff line number Diff line change 1- web : gunicorn application:application --bind 0.0.0.0:80 -k uvicorn.workers.UvicornWorker
1+ web : gunicorn application:application --bind 0.0.0.0:8000 -k uvicorn.workers.UvicornWorker
You can’t perform that action at this time.
0 commit comments