astro-cloudflare-basic-auth
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

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.

Package Sidebar

Install

npm i astro-cloudflare-basic-auth

Weekly Downloads

10

Version

0.1.6

License

MIT

Unpacked Size

11.8 kB

Total Files

15

Last publish

Collaborators

  • tylergannon