Whether a request carries the cron secret ("Authorization: Bearer …").
Fails closed when no secret is set, and compares in constant time so the
secret can't be guessed a character at a time.
Parameters
header: string|null
The request's Authorization header.
secret: string|undefined
Your cron secret, such as process.env.CRON_SECRET.
Whether a request carries the cron secret ("Authorization: Bearer …"). Fails closed when no secret is set, and compares in constant time so the secret can't be guessed a character at a time.