aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools')
-rw-r--r--server/tools/peertube-auth.ts3
1 files changed, 2 insertions, 1 deletions
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
39} 39}
40 40
41function isURLaPeerTubeInstance (url: string) { 41function isURLaPeerTubeInstance (url: string) {
42 return isHostValid(url) || (url.includes('localhost')) 42 return url.startsWith('http://') || url.startsWith('https://')
43} 43}
44 44
45program 45program
@@ -61,6 +61,7 @@ program
61 url: { 61 url: {
62 description: 'instance url', 62 description: 'instance url',
63 conform: (value) => isURLaPeerTubeInstance(value), 63 conform: (value) => isURLaPeerTubeInstance(value),
64 message: 'It should be an URL (https://peertube.example.com)',
64 required: true 65 required: true
65 }, 66 },
66 username: { 67 username: {