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

Oldest comments (0)