Skip to content
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

What is the unsafe option? #51

Open
RevealedFrom opened this issue Feb 4, 2021 · 0 comments
Open

What is the unsafe option? #51

RevealedFrom opened this issue Feb 4, 2021 · 0 comments

Comments

@RevealedFrom
Copy link

RevealedFrom commented Feb 4, 2021

What is the unsafe option and when should it be used?

I looked through the source code and unsafe doesn't seem to make a difference. req.flash in the following is always undefined every time the middleware is called on every Http request, so that test condition will always be false.

function(req, res, next) {
  if (req.flash && safe) { return next(); }
  req.flash = _flash;
  next();
}
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

No branches or pull requests

1 participant