Barty
Barty
CDCloudflare Developers
Created by Barty on 2/27/2025 in #r2
Hi everyone!
@Space Here's how it looks in our nginx config:
...
location /r2-upload/ {
limit_except PUT OPTIONS {
deny all;
}
client_body_buffer_size 256k;
proxy_ssl_server_name on;
proxy_request_buffering off;
proxy_pass https://<account_id>.r2.cloudflarestorage.com/;
}
...
...
location /r2-upload/ {
limit_except PUT OPTIONS {
deny all;
}
client_body_buffer_size 256k;
proxy_ssl_server_name on;
proxy_request_buffering off;
proxy_pass https://<account_id>.r2.cloudflarestorage.com/;
}
...
7 replies
CDCloudflare Developers
Created by Barty on 2/27/2025 in #r2
Hi everyone!
Yes, we proxied the PUT requests through an nginx proxy living on the other domain and now it works.
7 replies
CDCloudflare Developers
Created by Barty on 2/27/2025 in #r2
Hi everyone!
Do you have any resources that could help us achieve this?
7 replies
CDCloudflare Developers
Created by Barty on 2/27/2025 in #r2
Hi everyone!
oh wow. Would adding custom domain on the R2 fix this?
7 replies
CDCloudflare Developers
Created by Barty on 2/27/2025 in #r2
Hi everyone!
The only error we’re seeing is this one in the browser console: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://<accountid>.eu.r2.cloudflarestorage.com/<path-to-resource>/74128302-057e-4861-8cfb-37b7fd77962b.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=dc122a2b950b91b5a36877a0de1a66ea%2F20250226%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20250226T185806Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=content-length%3Bcontent-type%3Bhost&X-Amz-Signature=525e6bbf66888766a9dd23e43f1bdfb1a7e5923366295136d87b1fec13113457. (Reason: CORS request did not succeed). Status code: (null). Things we tried that didn’t help: * Updating the Boto3 package on backend to v1.35 * Updating the Uppy library to the latest version * Changing CORS policy settings on R2 * Changing browsers * The issue appears both on multipart and non-multipart uploads * Using different files with different sizes. Has anyone else run into this? Any ideas on why this might be happening, or tips on how to fix it? Also, if there are any debugging steps or tools you’d recommend, that would be super helpful. Thanks in advance for the help!
7 replies