Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connect-redirecthost

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-redirecthost - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

7

package.json

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc