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

connect-redirecthost

Package Overview
Dependencies
Maintainers
2
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.4 to 1.0.0

.npmignore

2

lib/redirectHost.js

@@ -129,5 +129,5 @@ /*!

}else{
res.redirect('http://' + to + pathFunc(host, url)); //<- change url based on host
res.redirect(301, 'http://' + to + pathFunc(host, url)); //<- change url based on host
}
};
}

@@ -5,3 +5,3 @@ {

"description": "Connect middleware for the Express.js framework that allows redirecting multiple domains to a default one",
"version": "0.0.4",
"version": "1.0.0",
"repository": {

@@ -15,3 +15,3 @@ "url": "git@github.com:perropicante/connect-redirecthost.git"

"dependencies": {
"underscore" : "1.1.7"
"underscore" : "1.6.0"
},

@@ -18,0 +18,0 @@ "devDependencies": {

@@ -5,2 +5,4 @@ # Connect Host Redirect

[![Build Status](https://secure.travis-ci.org/perropicante/connect-redirecthost.png)](http://travis-ci.org/perropicante/connect-redirecthost)
## Installation

@@ -67,4 +69,4 @@

View the LICENSE file.
MIT License, see the LICENSE file.

@@ -14,8 +14,14 @@ /*!

var res = {};
res.redirect = function(to){
res.redirect = function(statusCode, to){
this._statusCode = statusCode;
this._location = to;
};
res.__defineGetter__('statusCode', function(){
return this._statusCode;
});
res.__defineGetter__('location', function(){
return this._location;
});
return res;

@@ -49,4 +55,5 @@ }

middleware(req, res, failNext);
assert.equal(res.statusCode, 301);
assert.equal(res.location, to);
assert.equal(res.location, to);
};

@@ -53,0 +60,0 @@ }

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