jaredhanson/connect-flash

What is the `unsafe` option?

RevealedFrom opened this issue · 0 comments

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();
}