diff --git a/nginx/nginx.conf.template b/nginx/nginx.conf.template index c9c00ae..3a8a4b0 100644 --- a/nginx/nginx.conf.template +++ b/nginx/nginx.conf.template @@ -77,6 +77,18 @@ http { return 301 $BACKEND_ENDPOINT/; } + location $BACKEND_ENDPOINT/ws { + rewrite ^$BACKEND_ENDPOINT/(.*)$ /$1 break; + proxy_pass http://$BACKEND_HOST:$BACKEND_PORT/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_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; + proxy_set_header X-Forwarded-Proto $scheme; + } + location $BACKEND_ENDPOINT/ { rewrite ^$BACKEND_ENDPOINT/(.*)$ /$1 break; proxy_pass http://$BACKEND_HOST:$BACKEND_PORT/; diff --git a/nginx/vue/src/components/util/Chat.vue b/nginx/vue/src/components/util/Chat.vue index d5383f6..258e5c1 100644 --- a/nginx/vue/src/components/util/Chat.vue +++ b/nginx/vue/src/components/util/Chat.vue @@ -23,15 +23,13 @@ onUnmounted(() => {