Spaces:
Sleeping
Sleeping
Update nginx.conf
Browse files- nginx.conf +27 -27
nginx.conf
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
|
|
| 1 |
server {
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
add_header Cross-Origin-Embedder-Policy require-corp;
|
| 10 |
-
add_header Cross-Origin-Resource-Policy cross-origin;
|
| 11 |
-
proxy_set_header Host $host;
|
| 12 |
-
proxy_set_header X-Real-IP $remote_addr;
|
| 13 |
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 14 |
-
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
| 15 |
-
}
|
| 16 |
-
error_page 500 502 503 504 /50x.html;
|
| 17 |
-
location = /50x.html {
|
| 18 |
-
root /usr/share/nginx/html;
|
| 19 |
-
}
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
}
|
|
|
|
| 1 |
+
|
| 2 |
server {
|
| 3 |
+
listen 7860 default_server;
|
| 4 |
+
listen [::]:7860 default_server;
|
| 5 |
+
|
| 6 |
+
server_name _;
|
| 7 |
+
|
| 8 |
+
root /usr/share/nginx/html;
|
| 9 |
+
index index.html index.htm;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
# Serve static files directly.
|
| 12 |
+
location / {
|
| 13 |
+
try_files $uri $uri/ /index.html;
|
| 14 |
+
}
|
| 15 |
|
| 16 |
+
location /custom-auth/ {
|
| 17 |
+
# Serve backend from port
|
| 18 |
+
rewrite /static/(.*) /$1 break;
|
| 19 |
+
proxy_pass http://localhost:8000;
|
| 20 |
+
proxy_http_version 1.1;
|
| 21 |
+
proxy_set_header Upgrade $http_upgrade;
|
| 22 |
+
proxy_set_header Connection 'upgrade';
|
| 23 |
+
proxy_set_header Host $host;
|
| 24 |
+
proxy_set_header X-Real-IP $remote_addr;
|
| 25 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 26 |
+
proxy_cache_bypass $http_upgrade;
|
| 27 |
+
proxy_read_timeout 86400;
|
| 28 |
+
proxy_redirect off;
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
|
|
|