Next.js Discord

Discord Forum

Secure Cron Job endpoints?

Unanswered
American Sable posted this in #help-forum
Open in Discord
American SableOP
At the moment I have my cron job setup like so
{
      "path": "/api/tablePurge",
      "schedule": "0 2 * * *",
      "headers": {
        "x-vercel-cron": "@CRON_SECRET"
      }
    }


However passing headers is not supported. How can I go about ensuring that the endpoint in my path is not publicly accessible, and cannot be called without any authentication?

0 Replies