1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Pod URL -> pod host. HTTPS is required to make friends.

Reason: in a network with mix http/https pods, https pods won't be able
to play videos from http pod (insecure requests).
This commit is contained in:
Chocobozzz 2016-11-14 20:03:04 +01:00
parent 41b5da1d8c
commit 49abbbbedc
24 changed files with 167 additions and 195 deletions

View file

@ -10,7 +10,7 @@ const validatorsPod = {
}
function makeFriends (req, res, next) {
req.checkBody('urls', 'Should have an array of unique urls').isEachUniqueUrlValid()
req.checkBody('hosts', 'Should have an array of unique hosts').isEachUniqueHostValid()
logger.debug('Checking makeFriends parameters', { parameters: req.body })
@ -32,7 +32,7 @@ function makeFriends (req, res, next) {
}
function podsAdd (req, res, next) {
req.checkBody('url', 'Should have an url').notEmpty().isURL({ require_protocol: true })
req.checkBody('host', 'Should have an host').notEmpty().isURL()
req.checkBody('publicKey', 'Should have a public key').notEmpty()
// TODO: check we don't have it already