aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/requests.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-11-27 18:25:35 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-11-27 18:25:35 +0100
commit38d78e5b82a30d1318e3cc2532b7ea22b8e163fa (patch)
tree3c4cdab683caf1e30c6e76ba78efeb0431fec932 /server/helpers/requests.js
parentbf57d5eebf8b0fa2361b7973ce9772abd1bb4828 (diff)
downloadPeerTube-38d78e5b82a30d1318e3cc2532b7ea22b8e163fa.tar.gz
PeerTube-38d78e5b82a30d1318e3cc2532b7ea22b8e163fa.tar.zst
PeerTube-38d78e5b82a30d1318e3cc2532b7ea22b8e163fa.zip
Server: remove encryption when seending requests to other pods
We don't need it anymore since HTTPS is mandatory now
Diffstat (limited to 'server/helpers/requests.js')
-rw-r--r--server/helpers/requests.js17
1 files changed, 2 insertions, 15 deletions
diff --git a/server/helpers/requests.js b/server/helpers/requests.js
index 06109ce16..b0cda09fe 100644
--- a/server/helpers/requests.js
+++ b/server/helpers/requests.js
@@ -44,21 +44,8 @@ function makeSecureRequest (params, callback) {
44 44
45 // If there are data informations 45 // If there are data informations
46 if (params.data) { 46 if (params.data) {
47 // Encrypt data 47 requestParams.json.data = params.data
48 if (params.encrypt === true) { 48 request.post(requestParams, callback)
49 peertubeCrypto.encrypt(params.toPod.publicKey, JSON.stringify(params.data), function (err, encrypted) {
50 if (err) return callback(err)
51
52 requestParams.json.data = encrypted.data
53 requestParams.json.key = encrypted.key
54
55 request.post(requestParams, callback)
56 })
57 } else {
58 // No encryption
59 requestParams.json.data = params.data
60 request.post(requestParams, callback)
61 }
62 } else { 49 } else {
63 // No data 50 // No data
64 request.post(requestParams, callback) 51 request.post(requestParams, callback)