refactor: Update WebSocket connection initialization in terminal.blade.php
This commit is contained in:
parent
8179a5c6a3
commit
2e56edd939
1 changed files with 4 additions and 3 deletions
|
|
@ -61,6 +61,9 @@ function initializeWebSocket() {
|
|||
port: ":6002",
|
||||
path: '/terminal/ws'
|
||||
}
|
||||
if (!window.location.port) {
|
||||
connectionString.port = ''
|
||||
}
|
||||
if (predefined.host) {
|
||||
connectionString.host = predefined.host
|
||||
}
|
||||
|
|
@ -70,9 +73,7 @@ function initializeWebSocket() {
|
|||
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}`
|
||||
|
|
|
|||
Loading…
Reference in a new issue