DEV Community 👩‍💻👨‍💻

mhx
mhx

Posted on

Simple Protected Routes Middleware in NextJS 12

just put the code below in <project-root>/middleware.ts

https://gist.github.com/mhaecal/f6acdfb108080fdce44e4c2f3eead306

Top comments (0)

🌚 Life is too short to browse without dark mode