Skip to content

Commit 0b5be76

Browse files
author
JeremyAndress
committed
➕ add gunicorn and fix headers nginx
1 parent 7fc5be2 commit 0b5be76

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

nginx/site.conf

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@ upstream web {
99
}
1010

1111
server {
12-
12+
client_max_body_size 4G;
13+
# server_name example.com;
1314
error_log /log/nginx-error.log;
1415
access_log /log/nginx-access.log timed_combined;
1516

1617
location / {
18+
proxy_set_header Host $http_host;
19+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
20+
proxy_set_header X-Forwarded-Proto $scheme;
21+
proxy_redirect off;
22+
proxy_buffering off;
1723
proxy_pass http://web/;
1824
}
1925
}

requirements/local.txt

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ chardet==3.0.4
66
Click==7.0
77
Flask==1.1.1
88
Flask-Cors==3.0.8
9+
gunicorn==20.0.4
910
idna==2.8
1011
importlib-metadata==1.3.0
1112
itsdangerous==1.1.0
@@ -19,6 +20,7 @@ PyMySQL==0.9.3
1920
pytz==2019.3
2021
redis==3.3.11
2122
requests==2.22.0
23+
six==1.15.0
2224
SQLAlchemy==1.3.12
2325
urllib3==1.25.7
2426
vine==1.3.0

requirements/production.txt

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ chardet==3.0.4
66
Click==7.0
77
Flask==1.1.1
88
Flask-Cors==3.0.8
9+
gunicorn==20.0.4
910
idna==2.8
1011
importlib-metadata==1.3.0
1112
itsdangerous==1.1.0
@@ -19,6 +20,7 @@ PyMySQL==0.9.3
1920
pytz==2019.3
2021
redis==3.3.11
2122
requests==2.22.0
23+
six==1.15.0
2224
SQLAlchemy==1.3.12
2325
urllib3==1.25.7
2426
vine==1.3.0

0 commit comments

Comments
 (0)