PrestaGhis commited on
Commit
566eb2f
·
verified ·
1 Parent(s): 4e1a6ac

Update middleware.ts

Browse files
Files changed (1) hide show
  1. middleware.ts +6 -0
middleware.ts CHANGED
@@ -2,7 +2,13 @@ import { createServerClient } from '@supabase/ssr'
2
  import { NextResponse, type NextRequest } from 'next/server'
3
 
4
  export async function middleware(request: NextRequest) {
 
 
 
 
 
5
  let supabaseResponse = NextResponse.next({ request })
 
6
 
7
  const supabase = createServerClient(
8
  process.env.NEXT_PUBLIC_SUPABASE_URL!,
 
2
  import { NextResponse, type NextRequest } from 'next/server'
3
 
4
  export async function middleware(request: NextRequest) {
5
+ // BYPASS CRITIQUE : Pour Hugging Face Health Check
6
+ if (request.nextUrl.pathname.startsWith('/api/health')) {
7
+ return NextResponse.next()
8
+ }
9
+
10
  let supabaseResponse = NextResponse.next({ request })
11
+ // ... reste du code ...
12
 
13
  const supabase = createServerClient(
14
  process.env.NEXT_PUBLIC_SUPABASE_URL!,