Jon @ Transistor
03/09/2023, 7:18 PMkian
03/09/2023, 7:21 PMcontent-type
in AllowedHeaders
of your CORS configJon @ Transistor
03/09/2023, 7:23 PMJon @ Transistor
03/09/2023, 7:57 PMhas been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
kian
03/09/2023, 8:01 PMkian
03/09/2023, 8:02 PMAllowedHeaders
kian
03/09/2023, 8:02 PMJon @ Transistor
03/09/2023, 8:07 PMJon @ Transistor
03/09/2023, 11:03 PMAngius
03/09/2023, 11:40 PMhttps://<account_id>.r2.cloudflarestorage.com
to access my stuff... but the S3 docs for ListObjectsV2
tell me the host is supposed to be <bucket>.s3.amazonaws.com
... so do I need to use https://<bucket>.<account_id>.r2.cloudflarestorage.com
or...?Angius
03/09/2023, 11:46 PMErisa | Support Engineer
03/09/2023, 11:58 PMhttps://<bucket>.<account_id>.r2.cloudflarestorage.com
The <bucket>.s3.amazonaws.com
endpoint is for Amazon S3, the AWS product the S3 REST API was originally designed for. R2 is S3-compaptible which means it uses the same API but on its own endpoint and with its own backing data store
Aside from endpoint the functionality is the same for both, so the S3 docs can be used provided the endpoint is swapped out for the service being usedAngius
03/09/2023, 11:59 PMErisa | Support Engineer
03/09/2023, 11:59 PMAngius
03/10/2023, 12:21 AM> esbuild build.ts --outfile=build.mjs && node build.mjs
build.mjs 1.4kb
⚡ Done in 8ms
node:internal/deps/undici/undici:11413
Error.captureStackTrace(err, this);
^
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11413:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///G:/WebstormProjects/work/technikum/build.mjs:25:16 {
cause: [Error: DC450100:error:0A000410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1605:SSL alert number 40
] {
library: 'SSL routines',
reason: 'sslv3 alert handshake failure',
code: 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE'
}
}
Node.js v19.7.0
ELIFECYCLE Command failed with exit code 1.
Process finished with exit code 1
Trying to fetch()
from that URL throws some weird SSLv3 error. I tried using the --tls-min-v1.x
param when running node
, but whether that x
was 0, 1, 2, or 3, made no difference.Angius
03/10/2023, 12:31 AMAngius
03/10/2023, 12:45 AMcdn-mystuff.me.info
) for the bucket, https://mystuff.me.info
is added to the CORS settings of the bucket, and yet
html
<audio src="https://cdn-mystuff.me.info/my-bucket/my-file.mp3"></audio>
results in the file 404ingkian
03/10/2023, 12:54 AMmy-bucket
, /my-bucket
shouldn't be thereAngius
03/10/2023, 12:56 AMAngius
03/10/2023, 12:57 AMAngius
03/10/2023, 12:57 AMSid | R2
03/10/2023, 1:18 AMpedrocx486
03/10/2023, 3:39 AMhttps://cdn.pedrocx486.club/test3.png▾
Jacob | Pages
03/10/2023, 3:50 AMJacob | Pages
03/10/2023, 3:51 AMpedrocx486
03/10/2023, 3:51 AMpedrocx486
03/10/2023, 3:52 AMpedrocx486
03/10/2023, 3:52 AMpedrocx486
03/10/2023, 3:53 AMhttps://cdn.pedrocx486.club/test2.png▾