This service requires API key authentication to secure access when exposed to the internet.
- Generate a secure API key:
openssl rand -hex 32- Set the API key as a Cloudflare secret:
wrangler secret put API_KEY
# Paste your generated key when prompted- Deploy your service:
npm run deployimport { chromium } from "playwright";
const browser = chromium.connectOverCDP("https://your-service.workers.dev?apiKey=YOUR_API_KEY");
To run without authentication (e.g., for local development), add DEV=true to your .dev.vars