When sending HeadObject
request to MinIO instance proxied by Cloudflare, 403 is returned instead of 404 (for non-existent files). GET, PUT and DELETE operations can be performed with no issue.
For example, the following code fails with 403, originating from django-storages
when using collectstatic
command:
import boto3
s3 = boto3.client(
"s3",
region_name="us-east-1",
endpoint_url="<endpoint>",
aws_access_key_id="<key>",
aws_secret_access_key="<key>",
)
s3.head_object(Key="static/css/index.css", Bucket="mybucket")
The provided Key
is publicly available and returns 404 for GetObject requests.