Spaces:
Sleeping
Sleeping
Create nginx.conf
Browse files- nginx.conf +33 -0
nginx.conf
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
server {
|
| 2 |
+
listen 8080 default_server;
|
| 3 |
+
listen [::]:8080 default_server;
|
| 4 |
+
|
| 5 |
+
root /usr/share/nginx/html;
|
| 6 |
+
index index.html index.htm;
|
| 7 |
+
|
| 8 |
+
location / {
|
| 9 |
+
try_files $uri $uri/ /index.html;
|
| 10 |
+
add_header Cross-Origin-Opener-Policy same-origin;
|
| 11 |
+
add_header Cross-Origin-Embedder-Policy require-corp;
|
| 12 |
+
add_header Cross-Origin-Resource-Policy same-origin;
|
| 13 |
+
proxy_set_header Host $host;
|
| 14 |
+
proxy_set_header X-Real-IP $remote_addr;
|
| 15 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 16 |
+
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
error_page 500 502 503 504 /50x.html;
|
| 20 |
+
location = /50x.html {
|
| 21 |
+
root /usr/share/nginx/html;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
# If you still need the /custom-auth location from your old configuration, add it here
|
| 25 |
+
location /custom-auth {
|
| 26 |
+
proxy_pass http://localhost:8000;
|
| 27 |
+
proxy_http_version 1.1;
|
| 28 |
+
proxy_set_header Upgrade $http_upgrade;
|
| 29 |
+
proxy_set_header Connection 'upgrade';
|
| 30 |
+
proxy_set_header Host $host;
|
| 31 |
+
proxy_cache_bypass $http_upgrade;
|
| 32 |
+
}
|
| 33 |
+
}
|