遇见
4 years ago
4 changed files with 15 additions and 19 deletions
@ -1,13 +0,0 @@
@@ -1,13 +0,0 @@
|
||||
const jwt = require("express-jwt"); |
||||
const { PRIVATE_KEY } = require("../utils/constant"); |
||||
|
||||
module.exports = jwt({ |
||||
secret: PRIVATE_KEY, |
||||
// 需要指定一个加密算法
|
||||
// algorithms: ['HS256'],
|
||||
credentialsRequired: true, |
||||
}).unless({ |
||||
path: ["/", "/user/login", "/article/list"], |
||||
}); |
||||
|
||||
// 校验Token
|
Loading…
Reference in new issue