Merge pull request 'Fix boto3 XAmzContentSHA256Mismatch errors with Ceph RadosGW' (#1) from fix/boto3-checksum-validation into master
Reviewed-on: #1
This commit is contained in:
commit
1fb6b89a5f
@ -2,6 +2,7 @@ import os
|
|||||||
import hashlib
|
import hashlib
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
import boto3
|
import boto3
|
||||||
|
from botocore.config import Config
|
||||||
from botocore.exceptions import ClientError
|
from botocore.exceptions import ClientError
|
||||||
from fastapi import HTTPException
|
from fastapi import HTTPException
|
||||||
|
|
||||||
@ -26,6 +27,10 @@ class S3Storage:
|
|||||||
endpoint_url=f"http{'s' if self.secure else ''}://{self.endpoint}",
|
endpoint_url=f"http{'s' if self.secure else ''}://{self.endpoint}",
|
||||||
aws_access_key_id=self.access_key,
|
aws_access_key_id=self.access_key,
|
||||||
aws_secret_access_key=self.secret_key,
|
aws_secret_access_key=self.secret_key,
|
||||||
|
config=Config(
|
||||||
|
request_checksum_calculation="when_required",
|
||||||
|
response_checksum_validation="when_required"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Try to ensure bucket exists, but don't fail if MinIO isn't ready yet
|
# Try to ensure bucket exists, but don't fail if MinIO isn't ready yet
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user