connect-redirecthost
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -5,3 +5,3 @@ { | ||
"description": "Connect middleware for the Express.js framework that allows redirecting multiple domains to a default one", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"repository": { | ||
@@ -12,3 +12,3 @@ "url": "git@github.com:perropicante/connect-redirecthost.git" | ||
"engines": { | ||
"node": "~0.4.7" | ||
"node": ">= 0.4.7" | ||
}, | ||
@@ -20,3 +20,6 @@ "dependencies": { | ||
"vows": "latest" | ||
}, | ||
"scripts": { | ||
"test": "vows test/*.js" | ||
} | ||
} |
@@ -44,10 +44,13 @@ # Connect Host Redirect | ||
```app.use(require('connect-redirecthost').redirectHost({ | ||
```javascript | ||
app.use(require('connect-redirecthost').redirectHost({ | ||
to: 'www.example.com', | ||
changePath: {'www.example.ca': '/ca', 'www.example.us': '/us'} | ||
}));``` | ||
})); | ||
``` | ||
You can also specify a function to determine the new path; | ||
```app.use(require('connect-redirecthost').redirectHost({ | ||
```javascript | ||
app.use(require('connect-redirecthost').redirectHost({ | ||
to: 'www.example.com', | ||
@@ -58,3 +61,4 @@ changePath: { | ||
} | ||
}));``` | ||
})); | ||
``` | ||
@@ -61,0 +65,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39184
69