chore(nginx):update nginx config for websockets

This commit is contained in:
Leandro Antônio Farias Machado 2023-06-26 01:41:30 -03:00
parent ad43562714
commit 41d548ee66

View File

@ -77,7 +77,7 @@ http {
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /api {
location /api {
proxy_pass http://127.0.0.1:8001;
proxy_read_timeout 60;
proxy_connect_timeout 60;
@ -90,6 +90,19 @@ http {
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /socket.io {
proxy_pass http://127.0.0.1:5000;
proxy_read_timeout 60;
proxy_connect_timeout 60;
proxy_redirect off;
# Allow the use of websockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {