Skip to content

Commit 7939867

Browse files
committed
fix: prevent cache sharing across different user API keys in Fireworks models endpoint
Replace next.revalidate with cache: 'no-store' to prevent Next.js data cache from serving one user's API key response to another user. The data cache keys by URL only, not headers, so different BYOK keys would incorrectly share cached responses.
1 parent 4affc19 commit 7939867

File tree

1 file changed

+1
-1
lines changed
  • apps/sim/app/api/providers/fireworks/models

1 file changed

+1
-1
lines changed

apps/sim/app/api/providers/fireworks/models/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export async function GET(request: NextRequest) {
5353
Authorization: `Bearer ${apiKey}`,
5454
'Content-Type': 'application/json',
5555
},
56-
next: { revalidate: 300 },
56+
cache: 'no-store',
5757
})
5858

5959
if (!response.ok) {

0 commit comments

Comments
 (0)