diff options
Diffstat (limited to 'server/helpers/requests.js')
-rw-r--r-- | server/helpers/requests.js | 8 |
1 files changed, 5 insertions, 3 deletions
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) { | |||
25 | 25 | ||
26 | function makeSecureRequest (params, callback) { | 26 | function makeSecureRequest (params, callback) { |
27 | const requestParams = { | 27 | const requestParams = { |
28 | url: params.toPod.url + params.path | 28 | url: constants.REMOTE_SCHEME.HTTP + '://' + params.toPod.host + params.path |
29 | } | 29 | } |
30 | 30 | ||
31 | // Add data with POST requst ? | 31 | // Add data with POST requst ? |
@@ -34,9 +34,11 @@ function makeSecureRequest (params, callback) { | |||
34 | 34 | ||
35 | // Add signature if it is specified in the params | 35 | // Add signature if it is specified in the params |
36 | if (params.sign === true) { | 36 | if (params.sign === true) { |
37 | const host = constants.CONFIG.WEBSERVER.HOST | ||
38 | |||
37 | requestParams.json.signature = { | 39 | requestParams.json.signature = { |
38 | url: constants.CONFIG.WEBSERVER.URL, | 40 | host, |
39 | signature: peertubeCrypto.sign(constants.CONFIG.WEBSERVER.URL) | 41 | signature: peertubeCrypto.sign(host) |
40 | } | 42 | } |
41 | } | 43 | } |
42 | 44 | ||