Skip to content

Commit

Permalink
follow indentation conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
shapeshed committed Mar 7, 2012
1 parent d35a4ea commit 288b423
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/connect-force-domain.js
Expand Up @@ -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();
}
}
};

0 comments on commit 288b423

Please sign in to comment.