mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-07-19 01:14:35 +00:00
Fix websockets on other ports than 80
This commit is contained in:
parent
01a9896b19
commit
736e7d6167
1 changed files with 2 additions and 2 deletions
|
|
@ -163,7 +163,7 @@ function checksum (url, algo) {
|
|||
function command (url, command, onmessage, onclose) {
|
||||
let protocol = (ssl ? 'wss:' : 'ws:')
|
||||
url = removePrefix(url)
|
||||
url = `${protocol}//${window.location.hostname}${store.state.baseURL}/api/command${url}`
|
||||
url = `${protocol}//${window.location.host}${store.state.baseURL}/api/command${url}`
|
||||
|
||||
let conn = new window.WebSocket(url)
|
||||
conn.onopen = () => conn.send(command)
|
||||
|
|
@ -174,7 +174,7 @@ function command (url, command, onmessage, onclose) {
|
|||
function search (url, search, onmessage, onclose) {
|
||||
let protocol = (ssl ? 'wss:' : 'ws:')
|
||||
url = removePrefix(url)
|
||||
url = `${protocol}//${window.location.hostname}${store.state.baseURL}/api/search${url}`
|
||||
url = `${protocol}//${window.location.host}${store.state.baseURL}/api/search${url}`
|
||||
|
||||
let conn = new window.WebSocket(url)
|
||||
conn.onopen = () => conn.send(search)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue