QR Code Generator is intentionally minimal in its configuration surface. A single environment variable,Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dadu0699/qr-code/llms.txt
Use this file to discover all available pages before exploring further.
ALLOWED_ORIGINS, controls which browser origins are permitted to call the API cross-origin. Everything else — the runtime, entry point, and asset serving — is handled by the fixed settings in wrangler.jsonc. You define the variable once in the config file for local and preview use, and override it per environment in the Cloudflare dashboard for production.
Environment Variables
A comma-separated list of origins that are allowed to call the API cross-origin. Each entry must be a full origin including scheme and host (e.g.
https://myapp.com). An empty string means no cross-origin requests are permitted — only same-origin requests will receive CORS headers.Example: https://myapp.com,https://staging.myapp.comDefined in wrangler.jsonc under vars. Override per environment in the Cloudflare dashboard or by adding environment-specific vars blocks in wrangler.jsonc.Setting the Variable in wrangler.jsonc
The vars block in wrangler.jsonc defines environment variables that are injected into the Worker at runtime. This is the primary place to configure ALLOWED_ORIGINS for local development and preview deployments.
vars block directly:
Overriding in the Cloudflare Dashboard
For production deployments you should setALLOWED_ORIGINS through the Cloudflare dashboard rather than committing origin values to source control. Variables set in the dashboard take precedence over those defined in wrangler.jsonc.
Open your Worker settings
In the Cloudflare dashboard, navigate to Workers & Pages, then select the qr-code worker.
Go to Settings → Variables and Secrets
Select the Settings tab, then scroll to the Variables and Secrets section.
Add or edit ALLOWED_ORIGINS
Click Add variable (or edit the existing entry), set the name to
ALLOWED_ORIGINS, and enter your comma-separated list of production origins as the value.Configuration Reference
The fullwrangler.jsonc configuration reference for this project:
| Key | Value | Purpose |
|---|---|---|
name | qr-code | Worker name shown in the Cloudflare dashboard |
main | @astrojs/cloudflare/entrypoints/server | Astro Cloudflare adapter entry point |
compatibility_date | 2026-04-21 | Workers runtime version snapshot |
compatibility_flags | ["nodejs_compat"] | Enables Node.js API compatibility |
assets.directory | ./dist/client | Directory for static assets served by Workers Assets |
vars.ALLOWED_ORIGINS | "" | Comma-separated CORS origin allowlist |
ALLOWED_ORIGINS affects request handling at runtime, see the CORS guide.