【发布时间】:2023-01-07 21:11:55
【问题描述】:
中间件.ts
export { default } from 'next-auth/middleware';
export const config = { matcher: ['/my/:path*'] };
https://next-auth.js.org/configuration/nextjs#middleware
现在我这样使用,但代码不起作用
我希望中间件在访问与“我的”相关的页面时起作用。 我该如何解决?
"next": "^12.0.8",
"next-auth": "^4.10.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
这是我的包版本
【问题讨论】:
标签: next.js middleware next-auth