From 49abbbbedca83b9031d3e2eb3ae9ad9b6a7d96ed Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 14 Nov 2016 20:03:04 +0100 Subject: 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). --- server/helpers/requests.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'server/helpers/requests.js') diff --git a/server/helpers/requests.js b/server/helpers/requests.js index 95775c981..06109ce16 100644 --- a/server/helpers/requests.js +++ b/server/helpers/requests.js @@ -25,7 +25,7 @@ function makeRetryRequest (params, callback) { function makeSecureRequest (params, callback) { const requestParams = { - url: params.toPod.url + params.path + url: constants.REMOTE_SCHEME.HTTP + '://' + params.toPod.host + params.path } // Add data with POST requst ? @@ -34,9 +34,11 @@ function makeSecureRequest (params, callback) { // Add signature if it is specified in the params if (params.sign === true) { + const host = constants.CONFIG.WEBSERVER.HOST + requestParams.json.signature = { - url: constants.CONFIG.WEBSERVER.URL, - signature: peertubeCrypto.sign(constants.CONFIG.WEBSERVER.URL) + host, + signature: peertubeCrypto.sign(host) } } -- cgit v1.2.3