Skip to content

Conversation

@kyledmoore
Copy link

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.

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant