fix(api): force dynamic Node runtime on routes using cookies or request.url (pdf-diagnosis, documents/generaux, maintenance/status, staff/*, dl-contrat-signe)
This commit is contained in:
parent
ae4f91857a
commit
f5c2417ff0
12 changed files with 59 additions and 0 deletions
15
.vscode/tasks.json
vendored
Normal file
15
.vscode/tasks.json
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build-next",
|
||||
"type": "shell",
|
||||
"command": "npm run --silent build",
|
||||
"isBackground": false,
|
||||
"problemMatcher": [
|
||||
"$tsc"
|
||||
],
|
||||
"group": "build"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
export const dynamic = 'force-dynamic';
|
||||
export const revalidate = 0;
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
import { NextResponse } from "next/server";
|
||||
import { cookies } from "next/headers";
|
||||
import { createRouteHandlerClient } from "@supabase/auth-helpers-nextjs";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
export const dynamic = 'force-dynamic';
|
||||
export const revalidate = 0;
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { S3Client, ListObjectsV2Command } from "@aws-sdk/client-s3";
|
||||
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
export const dynamic = 'force-dynamic';
|
||||
export const revalidate = 0;
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
// Debug endpoint pour tester S3 en production
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { s3ObjectExists, getS3SignedUrl } from "@/lib/aws-s3";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
export const dynamic = 'force-dynamic';
|
||||
export const revalidate = 0;
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
// app/api/debug/pdf-diagnosis/route.ts
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { createSbServer } from "@/lib/supabaseServer";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
export const dynamic = 'force-dynamic';
|
||||
export const revalidate = 0;
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
// app/api/dl-contrat-signe/route.ts
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
export const dynamic = 'force-dynamic';
|
||||
export const revalidate = 0;
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { S3Client, ListObjectsV2Command } from "@aws-sdk/client-s3";
|
||||
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
export const dynamic = 'force-dynamic';
|
||||
export const revalidate = 0;
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
// app/api/maintenance/status/route.ts
|
||||
import { createSbServer } from "@/lib/supabaseServer";
|
||||
import { NextResponse } from "next/server";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
export const dynamic = 'force-dynamic';
|
||||
export const revalidate = 0;
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
import { NextResponse } from "next/server";
|
||||
import { createSbServer } from "@/lib/supabaseServer";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
export const dynamic = 'force-dynamic';
|
||||
export const revalidate = 0;
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { createRouteHandlerClient } from "@supabase/auth-helpers-nextjs";
|
||||
import { cookies } from "next/headers";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
export const dynamic = 'force-dynamic';
|
||||
export const revalidate = 0;
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { S3Client, ListObjectsV2Command } from "@aws-sdk/client-s3";
|
||||
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
export const dynamic = 'force-dynamic';
|
||||
export const revalidate = 0;
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
import { NextResponse } from "next/server";
|
||||
import { createSbServer } from "@/lib/supabaseServer";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue