Add env vars to load webui from different paths
This commit is contained in:
parent
e63a8c709c
commit
c85d83ae43
@ -120,6 +120,7 @@ const routes = [
|
|||||||
|
|
||||||
const router = new VueRouter({
|
const router = new VueRouter({
|
||||||
mode: 'history',
|
mode: 'history',
|
||||||
|
base: process.env.BASE_URL || '',
|
||||||
routes,
|
routes,
|
||||||
scrollBehavior() {
|
scrollBehavior() {
|
||||||
return { x: 0, y: 0 }
|
return { x: 0, y: 0 }
|
||||||
|
@ -33,5 +33,5 @@ class CustomSocket extends WebSocket {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const domain = process.env.WEBSOCKET_URL || location.host
|
||||||
export const socket = new CustomSocket((location.protocol === 'https:' ? 'wss://' : 'ws://') + location.host + '/')
|
export const socket = new CustomSocket((location.protocol === 'https:' ? 'wss://' : 'ws://') + domain + '/')
|
||||||
|
Loading…
Reference in New Issue
Block a user