jessec
05/04/2023, 8:04 PMpreview_bucket_name
? Trying to get local dev working for this worker, but I don't want to duplicate my files into a separate bucket.kian
05/04/2023, 8:04 PMErisa | Support Engineer
05/04/2023, 8:04 PMErisa | Support Engineer
05/04/2023, 8:05 PMjessec
05/04/2023, 8:43 PMjessec
05/04/2023, 8:47 PMnpx wrangler dev 'backend/src/app.ts' --experimental-local --compatibility-flags='nodejs_compat'
jessec
05/04/2023, 8:49 PMkian
05/04/2023, 8:49 PM--local
or --experimental-local
there since it says Miniflarekian
05/04/2023, 8:49 PMkian
05/04/2023, 8:49 PMdev
is remote with access to the 'real' bucketjessec
05/04/2023, 8:50 PMkian
05/04/2023, 8:50 PMkian
05/04/2023, 8:50 PM--local
jessec
05/04/2023, 8:51 PMkian
05/04/2023, 8:51 PM--experimental-local
?kian
05/04/2023, 8:51 PMdev
by default is remotejessec
05/04/2023, 8:59 PMfossfighter
05/04/2023, 9:39 PMChaika
05/04/2023, 9:46 PMfossfighter
05/04/2023, 9:49 PMChaika
05/04/2023, 9:50 PMChaika
05/04/2023, 9:52 PMfossfighter
05/04/2023, 9:53 PMiway1
05/05/2023, 2:42 AMfetch
for GET
request with presigned url? Getting No 'Access-Control-Allow-Origin' header is present on the requested resource.
I've tried all the stuff from https://developers.cloudflare.com/r2/buckets/cors/ and https://community.cloudflare.com/t/problem-with-settings-cors-policies-on-r2/432339...
Settings are:
[
{
"AllowedOrigins": [
"http://localhost:3000"
],
"AllowedMethods": [
"GET",
"PUT",
"HEAD"
],
"ExposeHeaders": [
"*"
],
"MaxAgeSeconds": 2
}
]
Karew
05/05/2023, 2:47 AMOrigin
header?iway1
05/05/2023, 2:52 AMOrigin
header cannot be set programmatically in javascriptiway1
05/05/2023, 3:12 AMKarew
05/05/2023, 3:15 AMKarew
05/05/2023, 3:15 AMiway1
05/05/2023, 3:54 AM<img/>
tag and also fetching that same image with fetch
, and theres some weird browser side caching going on that makes it where when the fetch
resolves it doesn't have the desired CORS header...
this must be the case because if I generate a second presigned url that doesn't appear in any <img/>
i don't get the CORS issue, nor do i see the issue if I try the same fetch from a different browser, also is fixed if I don't render an <img/>
with that src
IDK if this has anything to do with R2, i think it's just something chrome is doing. 🥲