Browse Source

fix: optimize code format

Pchen. 1 year ago
parent
commit
9cd902cc41
1 changed files with 1 additions and 1 deletions
  1. 1 1
      router.js

+ 1 - 1
router.js

@@ -25,7 +25,7 @@ router.use(express.static('./public'))
 // 定义中间件.unless指定哪些接口不需要进行token身份认证
 const { expressjwt: jwt } = require("express-jwt")
 const checkTokenMiddleware = jwt({ secret: secretKey, algorithms: ["HS256"] }).unless({
-    path: [/^\/userlogin/, /^\/register/],
+    path: [/^\/userlogin/, /^\/register/, /^\/getavatar/],
 })
 
 // 验证token