connection upgrade with nginx
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
server {
|
||||
listen 8080 default_server;
|
||||
listen 8042;
|
||||
listen [::]:8080 default_server;
|
||||
server_name transcendance;
|
||||
|
||||
@@ -11,6 +10,15 @@ server {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://backend_dev:3000;
|
||||
}
|
||||
|
||||
location /pong {
|
||||
proxy_pass http://game_server:8042/pong;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -18,13 +26,6 @@ server {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://frontend_dev:8080;
|
||||
}
|
||||
location /pong {
|
||||
http://game_server:8042/pong;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
|
||||
Reference in New Issue
Block a user