Merge pull request #3810 from mikiher/enable-subdirectory

Enable subdirectory support by default
This commit is contained in:
advplyr 2025-01-19 08:44:33 -06:00 committed by GitHub
commit 58ca26436d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
const pkg = require('./package.json')
const routerBasePath = process.env.ROUTER_BASE_PATH || ''
const routerBasePath = process.env.ROUTER_BASE_PATH || '/audiobookshelf'
const serverHostUrl = process.env.NODE_ENV === 'production' ? '' : 'http://localhost:3333'
const serverPaths = ['api/', 'public/', 'hls/', 'auth/', 'feed/', 'status', 'login', 'logout', 'init']
const proxy = Object.fromEntries(serverPaths.map((path) => [`${routerBasePath}/${path}`, { target: process.env.NODE_ENV !== 'production' ? serverHostUrl : '/' }]))