diff options
author | Chocobozzz <me@florianbigard.com> | 2023-01-27 08:30:56 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-01-27 08:30:56 +0100 |
commit | 8059e050ef4e800c95851ac97abbb2330fe17882 (patch) | |
tree | 6cd6cc94cea7d5234e95ddb86aed5be206c4f81c /server/lib/object-storage/urls.ts | |
parent | 2e5dd0bef8797dad82e5a908c30bc126cb924033 (diff) | |
download | PeerTube-8059e050ef4e800c95851ac97abbb2330fe17882.tar.gz PeerTube-8059e050ef4e800c95851ac97abbb2330fe17882.tar.zst PeerTube-8059e050ef4e800c95851ac97abbb2330fe17882.zip |
Fix live with base url object storage
Diffstat (limited to 'server/lib/object-storage/urls.ts')
-rw-r--r-- | server/lib/object-storage/urls.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/lib/object-storage/urls.ts b/server/lib/object-storage/urls.ts index a47a98b98..b8ef94559 100644 --- a/server/lib/object-storage/urls.ts +++ b/server/lib/object-storage/urls.ts | |||
@@ -57,5 +57,7 @@ function getBaseUrl (bucketInfo: BucketInfo, baseUrl?: string) { | |||
57 | 57 | ||
58 | const regex = new RegExp('https?://[^/]+') | 58 | const regex = new RegExp('https?://[^/]+') |
59 | function replaceByBaseUrl (fileUrl: string, baseUrl: string) { | 59 | function replaceByBaseUrl (fileUrl: string, baseUrl: string) { |
60 | if (!fileUrl) return fileUrl | ||
61 | |||
60 | return fileUrl.replace(regex, baseUrl) | 62 | return fileUrl.replace(regex, baseUrl) |
61 | } | 63 | } |