From 39b3c61d3ca8312cbbf75af67d551ef9128e9f6a Mon Sep 17 00:00:00 2001 From: Emir Karabeg Date: Mon, 3 Mar 2025 21:30:30 -0800 Subject: [PATCH] fix(deployment: fixed api key get --- app/api/workflow/middleware.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/api/workflow/middleware.ts b/app/api/workflow/middleware.ts index e7d63eff50..63c607528b 100644 --- a/app/api/workflow/middleware.ts +++ b/app/api/workflow/middleware.ts @@ -33,7 +33,8 @@ export async function validateWorkflowAccess( } // API key authentication - const apiKey = request.headers.get('x-api-key') + const apiKey = + request.headers.get('x-api-key') || request.nextUrl.searchParams.get('X-API-KEY') if (!apiKey || !workflow.apiKey || apiKey !== workflow.apiKey) { return { error: {