Clone04 commited on
Commit
001b613
1 Parent(s): 5dfc53d

Update nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +13 -1
nginx.conf CHANGED
@@ -1,9 +1,16 @@
 
 
 
 
 
 
1
  server {
2
  listen 4444 default_server;
3
  listen [::]:4444 default_server;
4
 
5
  server_name _;
6
 
 
7
  location / {
8
  # Serve GRADIO 7860
9
  proxy_pass http://localhost:7860;
@@ -18,6 +25,7 @@ server {
18
  proxy_redirect off;
19
  }
20
 
 
21
  location /static/ {
22
  # Serve backend from port 8000
23
  rewrite /static/(.*) /$1 break;
@@ -33,7 +41,11 @@ server {
33
  proxy_redirect off;
34
  }
35
 
 
36
  location /unity/ {
 
 
 
37
  # Serve Unity Mirror Networking on port 7777
38
  proxy_pass http://localhost:7777;
39
  proxy_http_version 1.1;
@@ -47,4 +59,4 @@ server {
47
  proxy_send_timeout 86400;
48
  proxy_redirect off;
49
  }
50
- }
 
1
+ # Set up a map to handle x-request-id
2
+ map $http_x_request_id $req_id {
3
+ default $http_x_request_id;
4
+ "" $request_id;
5
+ }
6
+
7
  server {
8
  listen 4444 default_server;
9
  listen [::]:4444 default_server;
10
 
11
  server_name _;
12
 
13
+ # Gradio application on port 7860
14
  location / {
15
  # Serve GRADIO 7860
16
  proxy_pass http://localhost:7860;
 
25
  proxy_redirect off;
26
  }
27
 
28
+ # Static files backend on port 8000
29
  location /static/ {
30
  # Serve backend from port 8000
31
  rewrite /static/(.*) /$1 break;
 
41
  proxy_redirect off;
42
  }
43
 
44
+ # Unity Mirror Networking on port 7777
45
  location /unity/ {
46
+ # Ensure no duplicate x-request-id header
47
+ proxy_set_header x-request-id $req_id;
48
+
49
  # Serve Unity Mirror Networking on port 7777
50
  proxy_pass http://localhost:7777;
51
  proxy_http_version 1.1;
 
59
  proxy_send_timeout 86400;
60
  proxy_redirect off;
61
  }
62
+ }