From a27782e4dee36310c44e4f038ae3e876aaa0c395 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 4 May 2026 02:35:10 +0000 Subject: [PATCH] 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 .r2.cloudflarestorage.com/wedding-media/, which R2 recognizes and applies the bucket's CORS policy to. https://claude.ai/code/session_01TPBqgcSJMppgrpiq7fLywL --- apps/web/wrangler.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/wrangler.toml b/apps/web/wrangler.toml index 9676df5..f9e884b 100644 --- a/apps/web/wrangler.toml +++ b/apps/web/wrangler.toml @@ -24,7 +24,7 @@ COUPLE_NAMES = "Stefanie & Leandro" PUBLIC_BASE_URL = "https://stefanieeleandro.pages.dev" S3_REGION = "auto" S3_BUCKET = "wedding-media" -S3_FORCE_PATH_STYLE = "false" +S3_FORCE_PATH_STYLE = "true" S3_ENDPOINT = "https://04cc83318332b325076a71c8db5e6c42.r2.cloudflarestorage.com" S3_PUBLIC_BASE_URL = "https://pub-e29e475661ee460c99ba6ea01cf26a7c.r2.dev" # CF_ACCESS_TEAM, CF_ACCESS_AUD are set after the Cloudflare Access app is created.