-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathproxy.ts
More file actions
22 lines (20 loc) · 819 Bytes
/
Copy pathproxy.ts
File metadata and controls
22 lines (20 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { type NextRequest } from "next/server";
import { updateSession } from "@/lib/supabase/middleware";
export async function proxy(request: NextRequest) {
return await updateSession(request);
}
export const config = {
matcher: [
/*
* Match all request paths except:
* - _next/static, _next/image (build output)
* - api (route handlers authenticate themselves — see skipsAuth)
* - the service worker, manifest and other static top-level assets
* - image files
*
* Everything matched here pays a Supabase Auth round trip, so the list is
* worth keeping tight.
*/
"/((?!_next/static|_next/image|api/|favicon.ico|sw.js|swe-worker-.*|workbox-.*|manifest.webmanifest|robots.txt|sitemap.xml|.*\\.(?:svg|png|jpg|jpeg|gif|webp|ico|json|txt|woff2?)$).*)",
],
};