mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
DNS name for proxying
This commit is contained in:
parent
977d1c9700
commit
0b2552bdff
1 changed files with 10 additions and 12 deletions
|
|
@ -26,28 +26,26 @@ server {
|
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
# Game WebSocket routing
|
||||
location ~/api/room/([^/]+)/socket {
|
||||
set $room_id $1;
|
||||
js_content main.routeWebSocket;
|
||||
}
|
||||
# DNS resolver for Docker's internal DNS
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
|
||||
# Game WebSocket routing
|
||||
location ~ /api/room/([^/]+)/socket {
|
||||
set $room_id $1;
|
||||
|
||||
proxy_pass http://room_$room_id:4500;
|
||||
|
||||
# WebSocket proxy location
|
||||
location @websocket_proxy {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_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;
|
||||
|
||||
# Timeouts
|
||||
|
||||
proxy_connect_timeout 7m;
|
||||
proxy_send_timeout 7m;
|
||||
proxy_read_timeout 7m;
|
||||
proxy_buffering off;
|
||||
|
||||
proxy_pass $proxy_target;
|
||||
}
|
||||
|
||||
location / {
|
||||
|
|
|
|||
Loading…
Reference in a new issue