Permalink
Browse files

Now works outside Express also.

  • Loading branch information...
1 parent db06fca commit b0104aaa43bf9b0c1f30de235b8887394ae54424 Golo Roden committed Feb 15, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/redirect.js
  2. +1 −1 package.json
View
@@ -11,7 +11,7 @@ var redirect = function(domain, configuration) {
statusCode;
if(hostHeader.indexOf('localhost') === 0 || hostHeader.indexOf(domain) === 0) {
- next();
+ if(next) next();
return;
}
View
@@ -1,6 +1,6 @@
{
"name": "node-force-domain",
- "version": "0.0.3",
+ "version": "0.0.4",
"main": "./lib/redirect.js",
"description": "node-force-domain is a middleware for Express.js that allows you to configure a default domain and redirect any requests to other domains.",
"author": "Golo Roden <webmaster@goloroden.de> (http://www.goloroden.de)",

0 comments on commit b0104aa

Please sign in to comment.