Skip to content

Commit

Permalink
feat(db): add supabase middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
rikhall1515 committed Apr 18, 2024
1 parent d2b7d0a commit 9a47ddb
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions middleware.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { type NextRequest } from "next/server";

import { updateSession } from "@/db/middleware";

export async function middleware(request: NextRequest) {
return await updateSession(request);
}

export const config = {
matcher: [
/*
* Match all request paths except:
* - _next/static (static files)
* - _next/image (image optimization files)
* - favicon.ico (favicon file)
* - images - .svg, .png, .jpg, .jpeg, .gif, .webp
* Feel free to modify this pattern to include more paths.
*/
"/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)",
],
};

0 comments on commit 9a47ddb

Please sign in to comment.