apps/api/src/index.ts has https://clerk.vote.dk24.org/__clerk (line 32) and Access-Control-Allow-Origin: https://vote.dk24.org (lines 45 and 64). apps/clerk-proxy/src/index.js:14,32 has the same literals, and its fetch(request) signature needs env added to read them.
Env examples are incomplete
A deployer following the current examples gets a broken app with no clue why.
apps/api/src/index.tshashttps://clerk.vote.dk24.org/__clerk(line 32) andAccess-Control-Allow-Origin: https://vote.dk24.org(lines 45 and 64).apps/clerk-proxy/src/index.js:14,32has the same literals, and itsfetch(request)signature needsenvadded to read them.FRONTEND_URLandCLERK_PROXY_URLas required Worker vars, and use them in both appsindex.ts:19isapp.use('*', cors())with no origin restriction — the entire API currently accepts requests from any origin. Lock it to{ origin: c.env.FRONTEND_URL, credentials: true }wrangler.toml:11— replace the realdatabase_idwithYOUR_D1_DATABASE_IDand documentwrangler d1 createdrizzle.config.tssaysvoting-system-db,wrangler.tomlsaysvote-systemEnv examples are incomplete
apps/api/.dev.vars.exampleis missingCLERK_WEBHOOK_SECRET, read at runtime bywebhook.Controller.tsapps/web/.env.exampleis missingVITE_CLERK_PROXY_URL, read bymain.tsx:13A deployer following the current examples gets a broken app with no clue why.