From: Darren Date: Sat, 1 Oct 2011 19:52:44 +0000 (+0100) Subject: forcessl detect port fix + typo X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0d9401e0833b968bdad89b687f825d0481fd18fe;p=KiwiIRC.git forcessl detect port fix + typo --- diff --git a/node/kiwi_modules/forcessl.js b/node/kiwi_modules/forcessl.js index 82e8cf2..fb94983 100644 --- a/node/kiwi_modules/forcessl.js +++ b/node/kiwi_modules/forcessl.js @@ -15,13 +15,13 @@ exports.onhttp = function (ev) { host = ev.request.headers.host; // Remove the port if one is set - if (host.search(/:/)) { + if (host.search(/:/) > -1) { host = host.substring(0, host.search(/:/)); } for (i in kiwi.config.ports) { if (kiwi.config.ports[i].secure) { - port = kiwi.config.ports[0].number; + port = kiwi.config.ports[i].number; break; } }