Changes to connection system to support docker

This commit is contained in:
Karmaa
2025-03-12 20:07:39 -05:00
parent 615c8d4ceb
commit 994de92451
3 changed files with 8 additions and 9 deletions

View File

@@ -24,16 +24,16 @@ http {
proxy_pass http://127.0.0.1:8081;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade"; # Fix this line to properly upgrade WebSockets
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
# Pass real IPs for logging and security
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 MongoDB socket requests
location /database.io/ {
proxy_pass http://127.0.0.1:8082;
proxy_http_version 1.1;
@@ -42,7 +42,6 @@ http {
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
# Allow WebSockets to function properly
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;