Spaces:
Running
Running
Update middleware.ts
Browse files- 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!,
|