Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

peertube auth add wants a URL (and not a host)

Chocobozzzfd0bfc3ac43e
diff --git a/server/tools/peertube-auth.ts b/server/tools/peertube-auth.ts
index ff5ffb60e9..1035d664aa 100644
--- a/server/tools/peertube-auth.ts
+++ b/server/tools/peertube-auth.ts
@@ -39,7 +39,7 @@ async function setInstance (url: string, username: string, password: string, isD
}
function isURLaPeerTubeInstance (url: string) {
- return isHostValid(url) || (url.includes('localhost'))
+ return url.startsWith('http://') || url.startsWith('https://')
}
program
@@ -61,6 +61,7 @@ program
url: {
description: 'instance url',
conform: (value) => isURLaPeerTubeInstance(value),
+ message: 'It should be an URL (https://peertube.example.com)',
required: true
},
username: {