Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

refactor: Update WebSocket connection initialization in terminal.blade.php

Andras Bacsai2e56edd93932
diff --git a/resources/views/livewire/project/shared/terminal.blade.php b/resources/views/livewire/project/shared/terminal.blade.php
index d54bb7c639..1a3edac0f9 100644
--- a/resources/views/livewire/project/shared/terminal.blade.php
+++ b/resources/views/livewire/project/shared/terminal.blade.php
@@ -61,6 +61,9 @@
port: ":6002",
path: '/terminal/ws'
}
+ if (!window.location.port) {
+ connectionString.port = ''
+ }
if (predefined.host) {
connectionString.host = predefined.host
}
@@ -70,9 +73,7 @@
if (predefined.protocol) {
connectionString.protocol = predefined.protocol
}
- if (!window.location.port) {
- connectionString.port = ''
- }
+
console.log(connectionString)
const url =
`${connectionString.protocol}://${connectionString.host}${connectionString.port}${connectionString.path}`