Add reverse proxy in nginx for socket.io

This commit is contained in:
Ricardo Paes
2022-02-08 11:51:12 -03:00
parent dad4fb83b8
commit 9792f81e1e

View File

@@ -6,6 +6,15 @@ location /{{ default .Env.FOLDER_BACKEND "api" }}/ {
proxy_pass {{ .Env.URL_BACKEND }};
}
location /socket.io/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass {{ .Env.URL_BACKEND }}socket.io/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location / {
try_files $uri $uri/ /index.html;
include include.d/nocache.conf;