1.0.0 • Published 9 years ago
whitelist-passthru v1.0.0
whitelist-passthru
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
1.0.0
9 years ago