mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 21:59:16 +03:00
* Draft * Update text for guide * Update text for guide * Update code for newer next js versions * Final small change * Update apps/docs/content/_partials/project_setup.mdx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Changes from review * Use project name in tutorial text * Fix up inclusion * Fix inclusion * Prettier --------- Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
20 lines
635 B
TypeScript
20 lines
635 B
TypeScript
import { type NextRequest } from 'next/server'
|
|
import { updateSession } from '@/utils/supabase/middleware'
|
|
|
|
export async function middleware(request: NextRequest) {
|
|
// update user's auth session
|
|
return await updateSession(request)
|
|
}
|
|
|
|
export const config = {
|
|
matcher: [
|
|
/*
|
|
* Match all request paths except for the ones starting with:
|
|
* - _next/static (static files)
|
|
* - _next/image (image optimization files)
|
|
* - favicon.ico (favicon file)
|
|
* Feel free to modify this pattern to include more paths.
|
|
*/
|
|
'/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)',
|
|
],
|
|
} |