mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-05-07 20:21:22 +00:00
refactor: Changed to latest authMiddleware
This commit is contained in:
parent
bd8d744ff3
commit
62c579cfec
1 changed files with 4 additions and 7 deletions
|
@ -1,12 +1,9 @@
|
||||||
import { withClerkMiddleware } from "@clerk/nextjs/server";
|
import { authMiddleware } from "@clerk/nextjs";
|
||||||
import { NextResponse } from "next/server";
|
|
||||||
import type { NextRequest } from "next/server";
|
|
||||||
|
|
||||||
export default withClerkMiddleware((_req: NextRequest) => {
|
export default authMiddleware({
|
||||||
return NextResponse.next();
|
publicRoutes: ["/"]
|
||||||
});
|
});
|
||||||
|
|
||||||
// Stop Middleware running on static files and public folder
|
|
||||||
export const config = {
|
export const config = {
|
||||||
matcher: ["/((?!_next|_static|_vercel|[\\w-]+\\.\\w+).*)"],
|
matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue