express-flash
express-flash copied to clipboard
Add options that are passed to connect-flash
This allows one to initialize the middleware with unsafe:true and suppress flash when desired by setting req.flash to a no-op function. I use this in controllers to prevent breaking res.render when the session is being destroyed or is otherwise not initialized.
That should have read "unsafe:false" - doh! That's why I hate negatively named boolean flags :).