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

heroku-bouncer

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heroku-bouncer - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

4

index.js

@@ -29,3 +29,7 @@ 'use strict';

if (!options.hasOwnProperty('ignoreRoutes')) {
options.ignoreRoutes = [];
}
options.herokuAuthURL || (options.herokuAuthURL = 'https://id.heroku.com');
}

@@ -10,2 +10,12 @@ 'use strict';

return function(req, res, next) {
var i, route;
for (i = 0; i < options.ignoreRoutes.length; i++) {
route = options.ignoreRoutes[i];
if (req.url.match(route)) {
return next();
}
}
if (req.session.userSession || isOAuthPath(req.path)) {

@@ -12,0 +22,0 @@ if (req.session.userSession) {

2

package.json
{
"name": "heroku-bouncer",
"version": "1.0.0",
"version": "1.1.0",
"description": "heroku bouncer middleware for express",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -20,3 +20,3 @@ # node-heroku-bouncer

Use the `bouncer.middleware` object to set up middleware that will ensure that
your users are logged in (and redirect otherwise), and the `bouncer.roues`
your users are logged in (and redirect otherwise), and the `bouncer.routes`
object to add the OAuth-specific routes to your app:

@@ -60,1 +60,4 @@

```
[cookieParser]: http://expressjs.com/3x/api.html#cookieParser
[cookieSession]: http://expressjs.com/3x/api.html#cookieSession

@@ -13,3 +13,4 @@ 'use strict';

herokuBouncerSecret: 'bouncer-secret',
herokuAuthURL : 'http://localhost:' + serverPort
herokuAuthURL : 'http://localhost:' + serverPort,
ignoreRoutes : [/^\/ignore/]
});

@@ -36,3 +37,7 @@

app.get('/ignore', function(req, res) {
res.end('no redirect');
});
return server;
}

@@ -104,2 +104,16 @@ 'use strict';

});
describe('ignoring routes', function() {
it('ignores specified routes', function(done) {
request({
url: 'http://localhost:' + clientPort + '/ignore',
followRedirect: false
}, function(err, res) {
if (err) throw err;
res.body.should.eql('no redirect');
done();
});
});
});
});
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