mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-16 06:11:38 +00:00
Fix: apply base path to client and websocket
This commit is contained in:
parent
dadd41cb5c
commit
97e8d4f5c0
6 changed files with 565 additions and 9 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="text-white max-h-screen h-screen overflow-hidden bg-bg">
|
||||
<div class="text-white max-h-screen h-screen overflow-hidden bg-bg">
|
||||
<app-appbar />
|
||||
|
||||
<app-side-rail v-if="isShowingSideRail" class="hidden md:block" />
|
||||
|
|
@ -368,6 +368,7 @@ export default {
|
|||
initializeSocket() {
|
||||
this.socket = this.$nuxtSocket({
|
||||
name: process.env.NODE_ENV === 'development' ? 'dev' : 'prod',
|
||||
channel: this.$config.routerBasePath,
|
||||
persist: 'main',
|
||||
teardown: false,
|
||||
transports: ['websocket'],
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ export default function ({ $axios, store, $config }) {
|
|||
config.url = `/dev${config.url}`
|
||||
console.log('Making request to ' + config.url)
|
||||
}
|
||||
|
||||
if ($config.routerBasePath) {
|
||||
config.url = `${$config.routerBasePath}/${config.url}`
|
||||
}
|
||||
})
|
||||
|
||||
$axios.onError(error => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue