filters.js 261 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 module.exports=function(Filter){ Filter.define("/!(login)", ["get","post"], "common_gray", function (gray, req, res, next){ if(gray.code==200){ next(); }else{ if(req.xhr){ res.json(gray); }else{ res.redirect('/login'); } } }); };