Set up Cloudflare Access for the Admin UI
mainThe Admin UI (/_admin/) must be protected using Cloudflare Access.
- Enable Access: In the Workers & Pages dashboard, select your worker, go to Settings > Domains & Routes, and click Enable Cloudflare Access on the
workers.devrow. - Configure Permissions: In the Cloudflare Zero Trust dashboard, add your email or identity provider to the allow list for the worker application.
- Set Secrets: You must provide the Application Audience (AUD) tag and your Team Domain as secrets so the worker can validate JWTs.
Required secrets:
CF_ACCESS_TEAM_DOMAIN: Your Cloudflare Access team domain (e.g.,myteam.cloudflareaccess.com).CF_ACCESS_AUD: The Application Audience (AUD) tag from your Access application settings.
# Your Cloudflare Access team domain
npx wrangler secret put CF_ACCESS_TEAM_DOMAIN
# The Application Audience (AUD) tag
npx wrangler secret put CF_ACCESS_AUD