express-redir

Like res.redirect but overrides the redirect if "_redirect" is available in req.body, req.query or req.session.

npm install express-redir
2 downloads in the last week
4 downloads in the last month

Like res.redirect but overrides the redirect if "_redirect" is available in req.body, req.query or req.session.

Think of it as a flash message but for redirects.

Install

npm install express-redir

Usage

var redir = require('express-redir');

// ...

// this should be at the top
// monkey patches res to offer res.redir()
app.use(redir);
npm loves you