From c54f21fcdde2f449b54670a9b1f6e5d8191a9be2 Mon Sep 17 00:00:00 2001 From: PhilipCNilsson7 Date: Mon, 3 Jul 2023 17:31:23 +0000 Subject: [PATCH] fix SignatureDoesNotMatch error when modifying an object on Cloudflare R2 --- S3/S3.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/S3/S3.py b/S3/S3.py index 9bf2e924..cda80e2e 100644 --- a/S3/S3.py +++ b/S3/S3.py @@ -855,6 +855,8 @@ def _sanitize_headers(self, headers): 'server', 'x-amz-id-2', 'x-amz-request-id', + # Cloudflare's R2 header we don't want to send + 'cf-ray', # Other headers that are not copying by a direct copy 'x-amz-storage-class', ## We should probably also add server-side encryption headers