mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-12-01 20:44:12 +01:00
Support servers with subdirectory
This commit is contained in:
1 parent
2452f09714
commit
16de3fdb97
4 files changed
+22
-12
No files matched your search
@@ -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