-
I study example: And learn: Inside file only static Html. The middleware.ts file represents only the matcher that prohibits the middleware from running for a route: api, _next/static, _next/image, favicon.ico As far as I can understand, all pages except the above mentioned ones should be protected Ok, I create file app/mw2/page.tsx: but route htpp://localhost:3000/mw2 is unprotected I found some code in auth.ts:
Please help me to understand how to protect pages with only middleware |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found solution. |
Beta Was this translation helpful? Give feedback.
I found solution.
I rewrite middleware.ts - and it's work.
https://github.com/gayratv/next-auth-example