Spaces:
Runtime error
Runtime error
Update deployment/docker/nginx.conf
Browse files
deployment/docker/nginx.conf
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
server {
|
2 |
-
listen
|
3 |
-
server_name
|
4 |
|
5 |
root /usr/share/nginx/html;
|
6 |
client_max_body_size 100M;
|
@@ -12,10 +12,13 @@ server {
|
|
12 |
# proxy api requests to flask server
|
13 |
location /api/ {
|
14 |
proxy_pass http://127.0.0.1:5000/;
|
|
|
|
|
|
|
|
|
15 |
}
|
16 |
|
17 |
location / {
|
18 |
try_files $uri /index.html;
|
19 |
}
|
20 |
}
|
21 |
-
|
|
|
1 |
server {
|
2 |
+
listen 80 default_server;
|
3 |
+
server_name guardai.io www.guardai.io;
|
4 |
|
5 |
root /usr/share/nginx/html;
|
6 |
client_max_body_size 100M;
|
|
|
12 |
# proxy api requests to flask server
|
13 |
location /api/ {
|
14 |
proxy_pass http://127.0.0.1:5000/;
|
15 |
+
proxy_set_header Host $host;
|
16 |
+
proxy_set_header X-Real-IP $remote_addr;
|
17 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
18 |
+
proxy_set_header X-Forwarded-Proto $scheme;
|
19 |
}
|
20 |
|
21 |
location / {
|
22 |
try_files $uri /index.html;
|
23 |
}
|
24 |
}
|
|