aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/videos.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-11-14 20:03:04 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-11-16 20:29:26 +0100
commit49abbbbedca83b9031d3e2eb3ae9ad9b6a7d96ed (patch)
tree68c59d67637a297d513e07ea96ba236a7f0cd43b /server/helpers/custom-validators/videos.js
parent41b5da1d8cb41f5c49f0e0a01a54106c9a5925dd (diff)
downloadPeerTube-49abbbbedca83b9031d3e2eb3ae9ad9b6a7d96ed.tar.gz
PeerTube-49abbbbedca83b9031d3e2eb3ae9ad9b6a7d96ed.tar.zst
PeerTube-49abbbbedca83b9031d3e2eb3ae9ad9b6a7d96ed.zip
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).
Diffstat (limited to 'server/helpers/custom-validators/videos.js')
-rw-r--r--server/helpers/custom-validators/videos.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/custom-validators/videos.js b/server/helpers/custom-validators/videos.js
index 45acb7686..4a6a62326 100644
--- a/server/helpers/custom-validators/videos.js
+++ b/server/helpers/custom-validators/videos.js
@@ -15,7 +15,7 @@ const videosValidators = {
15 isVideoDurationValid, 15 isVideoDurationValid,
16 isVideoMagnetValid, 16 isVideoMagnetValid,
17 isVideoNameValid, 17 isVideoNameValid,
18 isVideoPodUrlValid, 18 isVideoPodHostValid,
19 isVideoTagsValid, 19 isVideoTagsValid,
20 isVideoThumbnailValid, 20 isVideoThumbnailValid,
21 isVideoThumbnail64Valid 21 isVideoThumbnail64Valid
@@ -33,7 +33,7 @@ function isEachRemoteVideosValid (requests) {
33 isVideoDurationValid(video.duration) && 33 isVideoDurationValid(video.duration) &&
34 isVideoMagnetValid(video.magnet) && 34 isVideoMagnetValid(video.magnet) &&
35 isVideoNameValid(video.name) && 35 isVideoNameValid(video.name) &&
36 isVideoPodUrlValid(video.podUrl) && 36 isVideoPodHostValid(video.podHost) &&
37 isVideoTagsValid(video.tags) && 37 isVideoTagsValid(video.tags) &&
38 isVideoThumbnail64Valid(video.thumbnailBase64) && 38 isVideoThumbnail64Valid(video.thumbnailBase64) &&
39 isVideoRemoteIdValid(video.remoteId) 39 isVideoRemoteIdValid(video.remoteId)
@@ -70,7 +70,7 @@ function isVideoNameValid (value) {
70 return validator.isLength(value, VIDEOS_CONSTRAINTS_FIELDS.NAME) 70 return validator.isLength(value, VIDEOS_CONSTRAINTS_FIELDS.NAME)
71} 71}
72 72
73function isVideoPodUrlValid (value) { 73function isVideoPodHostValid (value) {
74 // TODO: set options (TLD...) 74 // TODO: set options (TLD...)
75 return validator.isURL(value) 75 return validator.isURL(value)
76} 76}