白名单
app/config.default.js
1 | exports.super_white_list = ["/user/login", "/user/registry"]; |
应用及中间件
通过 middleware 拦截请求,判断是否传递 token,校验 token 与服务器是否一致,实现用户权限的控制。
1 | const jwt = require("jsonwebtoken"); |
I'm so cute. Please give me money.
- Post link: https://blog.gaocaipeng.com/2019/09/02/hphwrr/
- Copyright Notice: All articles in this blog are licensed under unless otherwise stated.