Browse Source

Fix URL normalization in import script

Chocobozzz 4 years ago
parent
commit
4449d2695b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      server/tools/peertube-import-videos.ts

+ 1 - 1
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
   }