fix(gmail): fix unauthorized gmail polling

This commit is contained in:
Waleed Latif
2025-05-11 23:38:20 -07:00
parent 230143af3c
commit 2c7806feaa
@@ -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 })
}