From 288b42316f69a02c82c6bf56cd34e21215162557 Mon Sep 17 00:00:00 2001 From: George Ornbo Date: Wed, 7 Mar 2012 09:23:28 +0000 Subject: [PATCH] follow indentation conventions --- lib/connect-force-domain.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/connect-force-domain.js b/lib/connect-force-domain.js index 120ebeb..33a90f9 100644 --- a/lib/connect-force-domain.js +++ b/lib/connect-force-domain.js @@ -4,14 +4,14 @@ * Inspired by rack-force_domain * */ - module.exports = function(domain){ - domain = domain || false; - return function(req, res, next){ - if (domain && (req.headers.host != domain)){ - res.writeHead(301, {"Location": 'http://' + domain + req.url}); - res.end(); - } - next(); - } + domain = domain || false; + return function(req, res, next){ + if (domain && (req.headers.host != domain)){ + res.writeHead(301, {"Location": 'http://' + domain + req.url}); + res.end(); + } else { + next(); + } + } };