Commit Graph

7 Commits

Author SHA1 Message Date
Claude
913dc2b93d
fix: derive QR target URL from request, not stale env var
PUBLIC_BASE_URL was pointing to the planned pages.dev domain that
was never wired up, so QR codes encoded a non-functional URL. Use
the request's own origin as the source of truth (which also handles
custom domains automatically when added later) and only fall back
to PUBLIC_BASE_URL when an explicit override is passed via ?url=.
Also update PUBLIC_BASE_URL to the actual workers.dev hostname so
nothing else points at the wrong place.

https://claude.ai/code/session_01TPBqgcSJMppgrpiq7fLywL
2026-05-04 02:50:59 +00:00
Claude
a27782e4de
fix: use path-style URLs for R2
The presigned PUT URLs were missing the bucket name (only the key),
so R2 read 'uploads' as the bucket, returned a 404 with no CORS
headers, and the browser reported it as a CORS failure. Switch to
path-style so the URL becomes
<account>.r2.cloudflarestorage.com/wedding-media/<key>, which R2
recognizes and applies the bucket's CORS policy to.

https://claude.ai/code/session_01TPBqgcSJMppgrpiq7fLywL
2026-05-04 02:35:10 +00:00
Claude
4f85dd8721
chore: pin R2 endpoint and public URL in wrangler vars
Now that the bucket and r2.dev subdomain are provisioned, commit
the URLs as wrangler [vars] so deploys are reproducible without
relying on dashboard-managed plain-text variables. Only the access
key and secret remain dashboard-only secrets.

https://claude.ai/code/session_01TPBqgcSJMppgrpiq7fLywL
2026-05-04 02:01:12 +00:00
Claude
11a81975ff
fix: use boolean run_worker_first for wrangler 3.x compat
The array form of run_worker_first requires wrangler 4. Cloudflare
Build's local install resolves wrangler 3.x from our pinned devDep,
so switch to run_worker_first = true. The worker already handles
routing (/api/* -> Hono, else -> ASSETS), so semantics are unchanged.

https://claude.ai/code/session_01TPBqgcSJMppgrpiq7fLywL
2026-05-04 01:29:29 +00:00
Claude
11167e48f3
refactor: migrate web app to Workers + Static Assets format
The Cloudflare project was created as a Workers Build (the new
unified format), so the legacy Pages config (pages_build_output_dir,
functions/api/[[path]].ts) does not deploy. Switch to the modern
shape: a worker entry point that delegates to the Hono app for
/api/* and falls through to the [assets] binding for everything
else, with SPA fallback for client-side routes.

Build output (apps/web/dist) and bindings (D1, R2, env vars) are
unchanged.

https://claude.ai/code/session_01TPBqgcSJMppgrpiq7fLywL
2026-05-04 00:57:28 +00:00
c0a15ae730
Atualizar o wrangler.toml 2026-05-02 13:31:53 -03:00
Claude
be13179832
chore: scaffold Cloudflare Pages monorepo for wedding photos app
Set up pnpm workspaces with three packages: a shared Zod-schema
package, a Hono-based API exported as a library, and a Vite/React/
Tailwind frontend that mounts the API via Cloudflare Pages Functions.
Storage is abstracted behind an S3-compatible provider so the project
can migrate from R2 to a self-hosted MinIO without code changes.

https://claude.ai/code/session_01TPBqgcSJMppgrpiq7fLywL
2026-05-01 23:30:50 +00:00