From f4a9a06984b80d9e276403762b9375ca8b877f9a Mon Sep 17 00:00:00 2001 From: Elliot Braem Date: Mon, 9 Dec 2024 12:23:11 -0600 Subject: [PATCH] dif approach for timeout --- src/app/api/[[...slugs]]/route.ts | 3 +++ vercel.json | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 vercel.json diff --git a/src/app/api/[[...slugs]]/route.ts b/src/app/api/[[...slugs]]/route.ts index d91a9b1..2164cb8 100644 --- a/src/app/api/[[...slugs]]/route.ts +++ b/src/app/api/[[...slugs]]/route.ts @@ -9,6 +9,9 @@ type CacheEntry = { timestamp: number; }; +export const maxDuration = 60; // 60 seconds, config for timeout +export const dynamic = 'force-dynamic'; + const cache = new Map(); const CACHE_DURATION = 24 * 60 * 60 * 1000; // 24 hours in milliseconds diff --git a/vercel.json b/vercel.json deleted file mode 100644 index 09fa780..0000000 --- a/vercel.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "functions": { - "app/api/roast": { - "maxDuration": 60 - } - } -}