Skip to content

Commit 2c7806f

Browse files
committed
fix(gmail): fix unauthorized gmail polling
1 parent 230143a commit 2c7806f

File tree

1 file changed

+1
-2
lines changed
  • apps/sim/app/api/webhooks/poll/gmail

1 file changed

+1
-2
lines changed

apps/sim/app/api/webhooks/poll/gmail/route.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ export async function GET(request: NextRequest) {
4040

4141
try {
4242
const authHeader = request.headers.get('authorization')
43-
const webhookSecret = process.env.WEBHOOK_POLLING_SECRET
43+
const webhookSecret = process.env.CRON_SECRET || process.env.WEBHOOK_POLLING_SECRET
4444

4545
if (!webhookSecret) {
46-
logger.warn(`WEBHOOK_POLLING_SECRET is not set`)
4746
return new NextResponse('Configuration error: Webhook secret is not set', { status: 500 })
4847
}
4948

0 commit comments

Comments
 (0)