We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
看了源码并没有这个方法。
// 过滤不用jwt验证 app.use(jwt({secret: secret.sign}).unless({ path: [ /^\/api\/v1\/user/, /^\/api\/v1\/user\/login/] }))
ctx.app.jwt({secret: ctx.app.config.jwt.secret}).unless({ path: [ /^\/api\/v1\/user/, /^\/api\/v1\/user\/login/, /^\/signIn/, ] //数组中的路径不需要通过jwt验证 })
The text was updated successfully, but these errors were encountered:
这种全局配置 ignore 就可以了吧
Sorry, something went wrong.
在egg router 没有找到ignore那个。临时解决方案,是每个需要的接口都写上中间件。
const authToken = app.middleware.auth();
@chengnuo https://eggjs.org/zh-cn/basics/middleware.html#%E9%80%9A%E7%94%A8%E9%85%8D%E7%BD%AE
No branches or pull requests
看了源码并没有这个方法。
koa 实现
eggjs
The text was updated successfully, but these errors were encountered: