From 4449d2695bad78ac149ef5615f50286dcbe06f04 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 30 Dec 2019 10:44:50 +0100 Subject: [PATCH] Fix URL normalization in import script --- server/tools/peertube-import-videos.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { function normalizeTargetUrl (url: string) { let normalizedUrl = url.replace(/\/+$/, '') - if (!normalizedUrl.startsWith('http://') || !normalizedUrl.startsWith('https://')) { + if (!normalizedUrl.startsWith('http://') && !normalizedUrl.startsWith('https://')) { normalizedUrl = 'https://' + normalizedUrl } -- 2.41.0