Make chat component look nicer and upgrade websocket connection
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 1m47s

This commit is contained in:
2026-03-05 19:51:33 +00:00
parent 95635c86b3
commit 4a65836210
2 changed files with 15 additions and 5 deletions

View File

@@ -77,6 +77,18 @@ http {
return 301 $BACKEND_ENDPOINT/; 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/ { location $BACKEND_ENDPOINT/ {
rewrite ^$BACKEND_ENDPOINT/(.*)$ /$1 break; rewrite ^$BACKEND_ENDPOINT/(.*)$ /$1 break;
proxy_pass http://$BACKEND_HOST:$BACKEND_PORT/; proxy_pass http://$BACKEND_HOST:$BACKEND_PORT/;

View File

@@ -23,15 +23,13 @@ onUnmounted(() => {
</script> </script>
<template> <template>
<div> <div class="flex flex-col place-content-around h-full">
<div class="flex flex-col"> <div class="flex flex-col">
<p v-for="message in messages" :key="message.id"> <p v-for="message in messages" :key="message.id">
{{ message.text }} {{ message.text }}
</p> </p>
</div> </div>
<div class="flex flex-row">
<input v-model="messageInput" @keyup.enter="sendMessage" /> <input v-model="messageInput" @keyup.enter="sendMessage" />
<Button @click="sendMessage">Send</Button> <Button @click="sendMessage">Send</Button>
</div> </div>
</div>
</template> </template>