Omniroute / nginx.conf
nermind's picture
Upload 8 files
a25613c verified
Raw
History Blame Contribute Delete
1.33 kB
worker_processes 1;
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
client_max_body_size 25m;
# Where OmniRoute itself listens internally (not exposed outside the container).
upstream omniroute_backend {
server 127.0.0.1:8990;
}
server {
listen 20128;
server_name _;
# ---- Static PWA chat UI ----
# Served under /chat-ui/ so it never collides with OmniRoute's own routes
# (/, /dashboard, /v1/*, etc). Visit https://<space>.hf.space/chat-ui/
location /chat-ui/ {
alias /app/chat-ui/;
index index.html;
try_files $uri $uri/ /chat-ui/index.html;
add_header Cache-Control "no-cache";
}
# ---- Everything else -> OmniRoute (dashboard, API, websockets) ----
location / {
proxy_pass http://omniroute_backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
}
}
}