express-flash icon indicating copy to clipboard operation
express-flash copied to clipboard

Add options that are passed to connect-flash

Open kyledmoore opened this issue 7 years ago • 1 comments

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.

kyledmoore avatar Aug 03 '17 20:08 kyledmoore

That should have read "unsafe:false" - doh! That's why I hate negatively named boolean flags :).

kyledmoore avatar Aug 03 '17 20:08 kyledmoore