From 0d9401e0833b968bdad89b687f825d0481fd18fe Mon Sep 17 00:00:00 2001 From: Darren Date: Sat, 1 Oct 2011 20:52:44 +0100 Subject: [PATCH] forcessl detect port fix + typo --- node/kiwi_modules/forcessl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } } -- 2.25.1