Skip to content

Add options that are passed to connect-flash #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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