Merge pull request #86 from jonico/patch-1

feat: 60 s timeout for custom_generate endpoint to give more time for synchronous song creation on Vercel deployments
This commit is contained in:
blueeon 2024-05-26 21:14:31 +08:00 committed by GitHub
commit 9ebcfc48fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,7 @@ import { NextResponse, NextRequest } from "next/server";
import { sunoApi } from "@/lib/SunoApi"; import { sunoApi } from "@/lib/SunoApi";
import { corsHeaders } from "@/lib/utils"; import { corsHeaders } from "@/lib/utils";
export const maxDuration = 60; // allow longer timeout for wait_audio == true
export const dynamic = "force-dynamic"; export const dynamic = "force-dynamic";
export async function POST(req: NextRequest) { export async function POST(req: NextRequest) {