Yes, it was working before. We haven’t changed anything about Blackbaze or Cloudflare. All buckets are public. We are only using the b2 CNAME for “f005.backblazeb2.com”. See this example:
The image loads normally, but in our app, it doesn’t:
It used to load, but since we don’t have any domain configured for staging, we use this fly subdomain, but it doesn’t work. We have another instance “plataforma.superfoco.com.br”, where I had to change all the images to make it work. to something like this “b2.superfoco.com.br/file/superfoco-public/images/T02-thumb.webp”. But this is not the temporary solution I found it does not break in production, but not loading these images complicates the test locally, and also have other project members test things on staging. I believe it is a Cors issue or something like that, but in Blackblaze everything is configured correctly with “Share everything in this bucket with all origins”.
I can retrieve https://b2.unicte.com/file/unicte-public/trail_icons/pontos-criticos_armadilhas-sistemas-prediais_rectangle_1703620899626.jpeg via curl at the command-line just fine:
% curl -i https://b2.unicte.com/file/unicte-public/trail_icons/pontos-criticos_armadilhas-sistemas-prediais_rectangle_1703620899626.jpeg
HTTP/2 200
date: Fri, 16 Aug 2024 16:19:25 GMT
content-type: image/jpeg
content-length: 8186
x-bz-file-name: trail_icons/pontos-criticos_armadilhas-sistemas-prediais_rectangle_1703620899626.jpeg
x-bz-file-id: 4_z1025417dd062ddcf88aa0d17_f1158dd48bd16b55a_d20231226_m200140_c005_v0501013_t0033_u01703620900054
x-bz-content-sha1: unverified:a5a0e44c6b1851ca47fa05fcc4019d13459da617
x-bz-upload-timestamp: 1703620900054
content-encoding: base64
strict-transport-security: max-age=63072000
cache-control: max-age=14400
cf-cache-status: EXPIRED
last-modified: Fri, 16 Aug 2024 16:19:25 GMT
accept-ranges: bytes
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=v6fROu9BPKSCRE%2Fk8SPJP7BWfAryTri2mpGUxBwFu4AFge%2F%2BW2EGbECFWZY78Mqsaq%2FjWFNIKAHKiYBqYYEaKySsGG0clrX6us%2F4xi9UwHZFZw6m1o%2BMB%2Fy4IB5pfK2z"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 8b42beea9dc61694-SJC
alt-svc: h3=":443"; ma=86400
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.
But when I try to open it in the browser (in a new tab), I get this error:
So, it looks like you have enabled Hotlink Protection. Any requests that contain a Referer HTTP header that does not begin with https://b2.unicte.com/ will be denied with this error. You can simulate this with curl like this: