feat: add middleware route protection

This commit is contained in:
Riccardo
2024-06-25 22:31:56 +02:00
parent 35fa565d0a
commit 0e5bf94b07
4 changed files with 38 additions and 3 deletions

7
middleware.ts Normal file
View File

@@ -0,0 +1,7 @@
import { withMiddlewareAuthRequired } from '@auth0/nextjs-auth0/edge';
export default withMiddlewareAuthRequired();
export const config = {
matcher: ['/module/:path*', '/user']
};