clove/cdn
wrangler.jsonc
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "cdn",
"main": "src/main.ts",
"compatibility_date": "2026-09-01",
"observability": {
"logs": {
"enabled": true
}
},
// The site itself: the Svelte app from web/ plus everything in public/,
// built by Vite into dist/. Uploaded files live in R2, not here. The worker
// runs first on every request so it can add CORS headers, split the m. and
// fall back to the app shell for folder and file paths.
"build": {
"command": "deno task build",
"watch_dir": ["web", "public"]
},
"assets": {
"directory": "./dist",
"binding": "ASSETS",
"not_found_handling": "none",
"run_worker_first": true
},
"r2_buckets": [
{
"binding": "BUCKET",
"bucket_name": "cdn"
}
],
// Lets src/main.ts serve the repo-root LICENCE.md without a copy in public/.
"rules": [
{ "type": "Text", "globs": ["**/*.md"], "fallthrough": true }
],
// "routes": [{ "pattern": "m.doughmination.gay", "custom_domain": true }],
"dev": {
// The auth server's `wrangler dev` already owns 8787.
"port": 8788
},
"vars": {
"AUTH_ISSUER": "https://auth.doughmination.gay",
"RAW_URL": "https://raw.doughmination.gay",
"OIDC_CLIENT_ID": "cdn"
}
// Secrets (wrangler secret put <NAME>):
// OIDC_CLIENT_SECRET the client secret shown once when the client was created
// SESSION_SECRET signs the login cookie (openssl rand -base64 32)
}