astro-cloudflare-basic-auth
v0.1.6
Published
Astro integration that adds basic authentication to your cloudflare pages deployment.
Downloads
2
Maintainers
Readme
cloudflare-basic-auth
This Astro integration generates code that when deployed to a Cloudflare Pages app will require basic authentication.
Good for quick protection of staging sites.
Usage
Add the integration to your package.
pnpm add -D cloudflare-basic-auth
Configure the integration in your astro.config.mjs
.
import basicAuth from 'astro-cloudflare-basic-auth';
export default defineConfig({
integrations: [
basicAuth(),
/* ... */
]
})
Before you deploy to your CloudFlare pages app, set the password by adding a
CFP_PASSWORD
environment variable. The value that you set there will be the
password to your application.