Files
MorkNetVisualizer/frontend/nginx.conf
T

27 lines
602 B
Nginx Configuration File

server {
listen 80;
root /usr/share/nginx/html;
index index.html;
# Proxy WebSocket to backend
location /ws {
proxy_pass http://backend:8000/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_read_timeout 86400;
}
# Proxy API to backend
location /api/ {
proxy_pass http://backend:8000/api/;
proxy_set_header Host $host;
}
# SPA fallback
location / {
try_files $uri $uri/ /index.html;
}
}