fix(deploy): align /api routing, socket path, and proxy-aware auth limits

This commit is contained in:
2026-02-12 19:43:49 +01:00
parent e05edff84d
commit 6fe2ab3d28
7 changed files with 88 additions and 7 deletions
+36
View File
@@ -0,0 +1,36 @@
server {
listen 80;
server_name draw.louiscreates.com;
# Frontend static build
root /var/www/excalidash;
index index.html;
# SPA routing
location / {
try_files $uri $uri/ /index.html;
}
# API reverse proxy (Express mounted at /api)
location /api/ {
proxy_pass http://127.0.0.1:6768/api/;
proxy_http_version 1.1;
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;
}
# Socket.IO websocket/polling endpoint
location /api/socket.io/ {
proxy_pass http://127.0.0.1:6768/api/socket.io/;
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_read_timeout 600s;
}
}