mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-07-28 23:48:45 +02:00
Support servers with subdirectory
This commit is contained in:
@@ -486,9 +486,8 @@ export default {
|
||||
validateServerUrl(url, protocolOverride = null) {
|
||||
try {
|
||||
var urlObject = new URL(url)
|
||||
var address = `${protocolOverride ? protocolOverride : urlObject.protocol}//${urlObject.hostname}`
|
||||
if (urlObject.port) address += ':' + urlObject.port
|
||||
return address
|
||||
if (protocolOverride) urlObject.protocol = protocolOverride
|
||||
return urlObject.href
|
||||
} catch (error) {
|
||||
console.error('Invalid URL', error)
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user