connect-flash
connect-flash copied to clipboard
What is the `unsafe` option?
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();
}