cloudflare-workers-basic-auth
cloudflare-workers-basic-auth copied to clipboard
Basic http auth via cloudflare workers
Most of the code has been copy-pasted from https://github.com/jshttp/basic-auth
Why
I use it to protect static html pages.
Usage
- Set credentials in
index.js
const NAME = "super"
const PASS = "secret"
- Save and copy
index.js
to your cloudflare worker and deploy