mirror of
https://github.com/supabase/supabase.git
synced 2026-06-20 16:26:02 +08:00
* Quickstart next 16 update * Fix paths and env vars * docs: refactor nextjs server-side auth to use Proxy instead of middleware * docs: refactor nextjs server-side auth to match proxy * docs: refactor nextjs example to match Proxy * docs: refactor nextjs auth AI prompt to match Proxy * docs: refactor nextjs sentry telemetry integration to match Proxy * examples: update nextjs realtime example to match middleware * docs: refactoring guides to use nextjs proxy * examples: update nextjs-full example to match Next16 template * example: update nextjs-user-management to match nextjs 16 * docs: refactoring nextjs user-management tutorial to use typescript only * docs: refactoring nextjs quickstart, removing step 4 since this step is already included on `with-supabase` template, we can just remove this redundant step * docs: auth-helpers nextjs pages, Nextjs16 proxy disclaimer * stamp: lint * stamp: revert 'NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY' * stamp: nextjs examples, revert to use cookie options * fix(docs): typo * docs: updating nextjs-auth troubleshoot guide to match proxy * Update apps/docs/content/guides/getting-started/quickstarts/nextjs.mdx * Revert auth-helpers changes * Revert auth-helpers content * Apply suggestions from code review * Update apps/docs/content/troubleshooting/how-do-you-troubleshoot-nextjs---supabase-auth-issues-riMCZV.mdx * Update apps/docs/content/troubleshooting/how-do-you-troubleshoot-nextjs---supabase-auth-issues-riMCZV.mdx * Update apps/docs/content/troubleshooting/how-do-you-troubleshoot-nextjs---supabase-auth-issues-riMCZV.mdx * Update apps/docs/content/troubleshooting/how-do-you-troubleshoot-nextjs---supabase-auth-issues-riMCZV.mdx * Apply suggestions from code review * Prettier --------- Co-authored-by: kallebysantos <kalleby_santos@hotmail.com>
20 lines
592 B
TypeScript
20 lines
592 B
TypeScript
import { type NextRequest } from "next/server"
|
|
import { updateSession } from "@/lib/supabase/proxy"
|
|
|
|
export async function proxy(request: NextRequest) {
|
|
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)$).*)",
|
|
],
|
|
}
|