From 2c7806feaa33e2470fe0babb0911c1c96f7540d0 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 11 May 2025 23:38:18 -0700 Subject: [PATCH] fix(gmail): fix unauthorized gmail polling --- apps/sim/app/api/webhooks/poll/gmail/route.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/sim/app/api/webhooks/poll/gmail/route.ts b/apps/sim/app/api/webhooks/poll/gmail/route.ts index e80a8c1cff..93ca0f8e02 100644 --- a/apps/sim/app/api/webhooks/poll/gmail/route.ts +++ b/apps/sim/app/api/webhooks/poll/gmail/route.ts @@ -40,10 +40,9 @@ export async function GET(request: NextRequest) { try { const authHeader = request.headers.get('authorization') - const webhookSecret = process.env.WEBHOOK_POLLING_SECRET + const webhookSecret = process.env.CRON_SECRET || process.env.WEBHOOK_POLLING_SECRET if (!webhookSecret) { - logger.warn(`WEBHOOK_POLLING_SECRET is not set`) return new NextResponse('Configuration error: Webhook secret is not set', { status: 500 }) }