【文件属性】:
文件名称:islogin:用于检查用户是否登录的快速中间件
文件大小:7KB
文件格式:ZIP
更新时间:2021-07-02 16:15:04
JavaScript
登录
这是一个 Express 中间件,主要用于检查用户是否登录
安装
npm install islogin
用法
*Notice: in the lib use req.logined || req.session.logined to verify,
If you need to custom, please use a custom validator*
在 app.js 中
Use before the start of the route, here is the batch set all need to check the URL list, support for regular expressions
app.use(islogin({pattern:[/\/test\/*?/,'/home/index','/user/add'],redirect:'
【文件预览】:
islogin-master
----index.js(3KB)
----package.json(441B)
----simple()
--------index.js(678B)
--------group.js(924B)
--------app.js(147B)
----LICENSE(1KB)
----.gitignore(587B)
----README-CN.md(3KB)
----README.md(2KB)