11server {
22 listen 80;
3-
3+
4+ # Default route for root
5+ location = / {
6+ proxy_pass http://nmrium-prod:80/;
7+ proxy_http_version 1.1;
8+ proxy_set_header Upgrade $http_upgrade;
9+ proxy_set_header Connection 'upgrade';
10+ proxy_set_header Host $host;
11+ proxy_set_header X-Real-IP $remote_addr;
12+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
13+ proxy_set_header X-Forwarded-Proto $scheme;
14+ proxy_cache_bypass $http_upgrade;
15+ }
16+
17+ # Handle version-specific routes
18+ location ~ ^/v[0-9]+\.[0-9]+\.[0-9]+(/.*)?$ {
19+ proxy_pass http://nmrium-prod:80;
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_set_header X-Forwarded-Proto $scheme;
27+ proxy_cache_bypass $http_upgrade;
28+ }
29+
30+ # Handle all other routes
431 location / {
5- proxy_pass http://nmrium-dev :80;
32+ proxy_pass http://nmrium-prod :80;
633 proxy_http_version 1.1;
734 proxy_set_header Upgrade $http_upgrade;
835 proxy_set_header Connection 'upgrade';
936 proxy_set_header Host $host;
37+ proxy_set_header X-Real-IP $remote_addr;
38+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
39+ proxy_set_header X-Forwarded-Proto $scheme;
1040 proxy_cache_bypass $http_upgrade;
1141 }
1242}
@@ -15,11 +45,14 @@ server {
1545 listen 81;
1646
1747 location / {
18- proxy_pass http://nmrium-prod :80;
48+ proxy_pass http://nmrium-dev :80;
1949 proxy_http_version 1.1;
2050 proxy_set_header Upgrade $http_upgrade;
2151 proxy_set_header Connection 'upgrade';
2252 proxy_set_header Host $host;
53+ proxy_set_header X-Real-IP $remote_addr;
54+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
55+ proxy_set_header X-Forwarded-Proto $scheme;
2356 proxy_cache_bypass $http_upgrade;
2457 }
2558}
0 commit comments