mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-05-03 18:21:20 +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 { NextResponse } from "next/server";
|
||||
import type { NextRequest } from "next/server";
|
||||
import { authMiddleware } from "@clerk/nextjs";
|
||||
|
||||
export default withClerkMiddleware((_req: NextRequest) => {
|
||||
return NextResponse.next();
|
||||
export default authMiddleware({
|
||||
publicRoutes: ["/"]
|
||||
});
|
||||
|
||||
// Stop Middleware running on static files and public folder
|
||||
export const config = {
|
||||
matcher: ["/((?!_next|_static|_vercel|[\\w-]+\\.\\w+).*)"],
|
||||
matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"],
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue