Skip to content
Snippets Groups Projects
Commit 1b49ae1e authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] Try to contact port 443 with HTTPS protocol

parent 64cf087f
No related branches found
No related tags found
No related merge requests found
......@@ -180,7 +180,7 @@ function Multicaster (conf, timeout) {
}
return Q.Promise(function(resolve, reject){
const postReq = request.post({
"uri": 'http://' + peer.getURL() + uri,
"uri": protocol(peer.getPort()) + '://' + peer.getURL() + uri,
"timeout": timeout || constants.NETWORK.DEFAULT_TIMEOUT
}, function (err, res) {
if (err) {
......@@ -197,4 +197,8 @@ function Multicaster (conf, timeout) {
}
}
function protocol(port) {
return port == 443 ? 'https' : 'http';
}
util.inherits(Multicaster, stream.Transform);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment