diff options
Diffstat (limited to 'src/proxy.ts')
| -rw-r--r-- | src/proxy.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/proxy.ts b/src/proxy.ts new file mode 100644 index 0000000..796acfa --- /dev/null +++ b/src/proxy.ts @@ -0,0 +1,15 @@ +import { withAuth } from "next-auth/middleware" + +export default withAuth({ + callbacks: { + authorized: ({ token }) => !!token, + }, +}) + +export const config = { + matcher: [ + "/settings/:path*", + "/dashboard/:path*", + "/api/user/:path*" + ] +} |
