Hi,
I’ve got something weird going on.
I’ve got some files in a B2 bucket; for example:
https://f001.backblazeb2.com/file/fsccdn/10-Vespula-sp-male.jpg
I have a CNAME set up that points cdn.field-studies-council.org
to f001.backblazeb2.com
.
Finally, I have a transform rule that allows for removal of the /file/fsccdn
part of the path, like this:
https://cdn.field-studies-council.org/10-Vespula-sp-male.jpg
The transform rule I have set up is as follows:
- Incoming match
(http.host eq "cdn.field-studies-council.org")
- Path rewrite dynamic
concat("/file/fsccdn", http.request.uri.path)
- Query preserve
When I try and visit this URL in my browser, I get the following 404 (have tried in Firefox, Chrome, Edge)
{
"code": "not_found",
"message": "File with such name does not exist.",
"status": 404
}
However, it seems to load just fine if I reference the image in an image tag.
Also, if I download the file on the command line, that works too. Here I am getting the headers using httpie:
> http --headers https://cdn.field-studies-council.org/10-Vespula-sp-male.jpg
HTTP/1.1 200 OK
Accept-Ranges: bytes
CF-Cache-Status: HIT
CF-RAY: 78edbb0e997edcc3-LHR
Cache-Control: max-age=14400
Cf-Bgj: imgq:85,h2pri
Cf-Polished: degrade=85, origSize=59445
Connection: keep-alive
Content-Length: 33179
Content-Type: image/jpeg
Date: Wed, 25 Jan 2023 02:55:34 GMT
Last-Modified: Wed, 25 Jan 2023 02:08:31 GMT
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=nrZu9DS%2Fou5fq0KaM375nZfrg6p9hBIc6ISfnbeLPtbP3DHcvy1krENpBM4r2kfIV3tOxbpdBWOefbvHmj7dO%2BpYUj%2BoDuivlgkM%2FWMDodMXI9uPck0PMpn8MPYFapYdUH97w0awUK1iW2MVu5QU"}],"group":"cf-nel","max_age":604800}
Server: cloudflare
Server-Timing: cf-q-config;dur=7.0000005507609e-06
Vary: Accept
X-Bz-Upload-Timestamp: 1633231038000
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
x-bz-content-sha1: unverified:32ba7ca630ff4e386d5efecf981963835c49b0c2
x-bz-file-id: 4_ze7e6e66a1134494f7dc2081c_f100ba06e43b2165d_d20211003_m031718_c001_v0001144_t0038
x-bz-file-name: 10-Vespula-sp-male.jpg
x-bz-info-src_last_modified_millis: 1559681209000
Any idea what’s going on here?