Make chat component look nicer and upgrade websocket connection
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 1m47s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 1m47s
This commit is contained in:
@@ -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/;
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user