Spaces:
Running
Running
Hermes Agent commited on
Commit ·
59cd702
1
Parent(s): 0df6785
fix: Map /dashboard, /v1/, /assets/, /health to OmniRoute to fix redirection collision
Browse files- nginx.conf +29 -4
nginx.conf
CHANGED
|
@@ -10,9 +10,9 @@ http {
|
|
| 10 |
server {
|
| 11 |
listen 4096;
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
location /
|
| 15 |
-
proxy_pass http://127.0.0.1:20128
|
| 16 |
proxy_http_version 1.1;
|
| 17 |
proxy_set_header Upgrade $http_upgrade;
|
| 18 |
proxy_set_header Connection "upgrade";
|
|
@@ -22,7 +22,32 @@ http {
|
|
| 22 |
proxy_set_header X-Forwarded-Proto $scheme;
|
| 23 |
}
|
| 24 |
|
| 25 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
location / {
|
| 27 |
proxy_pass http://127.0.0.1:4097;
|
| 28 |
proxy_http_version 1.1;
|
|
|
|
| 10 |
server {
|
| 11 |
listen 4096;
|
| 12 |
|
| 13 |
+
# OmniRoute Dashboard UI
|
| 14 |
+
location /dashboard {
|
| 15 |
+
proxy_pass http://127.0.0.1:20128;
|
| 16 |
proxy_http_version 1.1;
|
| 17 |
proxy_set_header Upgrade $http_upgrade;
|
| 18 |
proxy_set_header Connection "upgrade";
|
|
|
|
| 22 |
proxy_set_header X-Forwarded-Proto $scheme;
|
| 23 |
}
|
| 24 |
|
| 25 |
+
# OmniRoute API & OpenAI-compatible routes
|
| 26 |
+
location /v1/ {
|
| 27 |
+
proxy_pass http://127.0.0.1:20128/v1/;
|
| 28 |
+
proxy_http_version 1.1;
|
| 29 |
+
proxy_set_header Upgrade $http_upgrade;
|
| 30 |
+
proxy_set_header Connection "upgrade";
|
| 31 |
+
proxy_set_header Host $host;
|
| 32 |
+
proxy_set_header X-Real-IP $remote_addr;
|
| 33 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 34 |
+
proxy_set_header X-Forwarded-Proto $scheme;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
# OmniRoute Static Assets
|
| 38 |
+
location /assets/ {
|
| 39 |
+
proxy_pass http://127.0.0.1:20128/assets/;
|
| 40 |
+
proxy_http_version 1.1;
|
| 41 |
+
proxy_set_header Host $host;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
# OmniRoute Health Check
|
| 45 |
+
location = /health {
|
| 46 |
+
proxy_pass http://127.0.0.1:20128/health;
|
| 47 |
+
proxy_set_header Host $host;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
# OpenCode Server & API (Default Route)
|
| 51 |
location / {
|
| 52 |
proxy_pass http://127.0.0.1:4097;
|
| 53 |
proxy_http_version 1.1;
|