refactor: Update WebSocket connection initialization in terminal.blade.php
This commit is contained in:
@@ -61,6 +61,9 @@
|
|||||||
port: ":6002",
|
port: ":6002",
|
||||||
path: '/terminal/ws'
|
path: '/terminal/ws'
|
||||||
}
|
}
|
||||||
|
if (!window.location.port) {
|
||||||
|
connectionString.port = ''
|
||||||
|
}
|
||||||
if (predefined.host) {
|
if (predefined.host) {
|
||||||
connectionString.host = predefined.host
|
connectionString.host = predefined.host
|
||||||
}
|
}
|
||||||
@@ -70,9 +73,7 @@
|
|||||||
if (predefined.protocol) {
|
if (predefined.protocol) {
|
||||||
connectionString.protocol = predefined.protocol
|
connectionString.protocol = predefined.protocol
|
||||||
}
|
}
|
||||||
if (!window.location.port) {
|
|
||||||
connectionString.port = ''
|
|
||||||
}
|
|
||||||
console.log(connectionString)
|
console.log(connectionString)
|
||||||
const url =
|
const url =
|
||||||
`${connectionString.protocol}://${connectionString.host}${connectionString.port}${connectionString.path}`
|
`${connectionString.protocol}://${connectionString.host}${connectionString.port}${connectionString.path}`
|
||||||
|
|||||||
Reference in New Issue
Block a user