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: {