From fd0bfc3ac43eb0c0c2ac0b21bc2e0670f546384f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 4 Jul 2019 15:03:15 +0200 Subject: peertube auth add wants a URL (and not a host) --- server/tools/peertube-auth.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/tools/peertube-auth.ts') diff --git a/server/tools/peertube-auth.ts b/server/tools/peertube-auth.ts index ff5ffb60e..1035d664a 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: { -- cgit v1.2.3