diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-04 15:03:15 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-07-04 15:03:15 +0200 |
commit | fd0bfc3ac43eb0c0c2ac0b21bc2e0670f546384f (patch) | |
tree | e7f20a348fbe9283563e90492fc9e5bce7926ea7 /server | |
parent | cb9d028a6ba2edc33fc658d3a6a7d3661e9fb5f0 (diff) | |
download | PeerTube-fd0bfc3ac43eb0c0c2ac0b21bc2e0670f546384f.tar.gz PeerTube-fd0bfc3ac43eb0c0c2ac0b21bc2e0670f546384f.tar.zst PeerTube-fd0bfc3ac43eb0c0c2ac0b21bc2e0670f546384f.zip |
peertube auth add wants a URL (and not a host)
Diffstat (limited to 'server')
-rw-r--r-- | server/tools/peertube-auth.ts | 3 |
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 | ||
41 | function isURLaPeerTubeInstance (url: string) { | 41 | function isURLaPeerTubeInstance (url: string) { |
42 | return isHostValid(url) || (url.includes('localhost')) | 42 | return url.startsWith('http://') || url.startsWith('https://') |
43 | } | 43 | } |
44 | 44 | ||
45 | program | 45 | program |
@@ -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: { |