diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-30 10:44:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-30 10:44:50 +0100 |
commit | 4449d2695bad78ac149ef5615f50286dcbe06f04 (patch) | |
tree | 7b18046a733f6ad16b672b45033277568be0d019 /server/tools | |
parent | 1f3a605e10a6e5fc820f9287a382a11d6dca41b4 (diff) | |
download | PeerTube-4449d2695bad78ac149ef5615f50286dcbe06f04.tar.gz PeerTube-4449d2695bad78ac149ef5615f50286dcbe06f04.tar.zst PeerTube-4449d2695bad78ac149ef5615f50286dcbe06f04.zip |
Fix URL normalization in import script
Diffstat (limited to 'server/tools')
-rw-r--r-- | server/tools/peertube-import-videos.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts index 39e8221c0..eaa792763 100644 --- a/server/tools/peertube-import-videos.ts +++ b/server/tools/peertube-import-videos.ts | |||
@@ -333,7 +333,7 @@ function isNSFW (info: any) { | |||
333 | function normalizeTargetUrl (url: string) { | 333 | function normalizeTargetUrl (url: string) { |
334 | let normalizedUrl = url.replace(/\/+$/, '') | 334 | let normalizedUrl = url.replace(/\/+$/, '') |
335 | 335 | ||
336 | if (!normalizedUrl.startsWith('http://') || !normalizedUrl.startsWith('https://')) { | 336 | if (!normalizedUrl.startsWith('http://') && !normalizedUrl.startsWith('https://')) { |
337 | normalizedUrl = 'https://' + normalizedUrl | 337 | normalizedUrl = 'https://' + normalizedUrl |
338 | } | 338 | } |
339 | 339 | ||