1.0.0 • Published 9 years ago

whitelist-passthru v1.0.0

Weekly downloads
2
License
MIT
Repository
-
Last release
9 years ago

whitelist-passthru Build Status

Wraps a middleware and skips it if the requested path is whitelisted,

Installation

node:

$ npm install whitelist-passthru

Usage

express:

var express = require('express'),
    app = express();

var passthru = require('whitelist-passthru');

/*
 * Will skip authMiddleware if req.path is /unprotected or /other.
 * Any other paths will go through authMiddleware
 */
app.use(passthru(authMiddleware, ['/unprotected', '/other']));

License

MIT