From 558fbf5f42f2c0bcc92c29d689110d09be01968f Mon Sep 17 00:00:00 2001 From: XOF Date: Sun, 28 Dec 2025 14:50:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20main.go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index a3c3ffd..caefd12 100644 --- a/main.go +++ b/main.go @@ -38,6 +38,11 @@ var client = &http.Client{ req.Header[key] = val } } + // S3 重定向时添加必要的头 + if strings.Contains(req.URL.Host, "amazonaws.com") { + req.Header.Set("x-amz-content-sha256", "UNSIGNED-PAYLOAD") + } + return nil }, Timeout: 30 * time.Second,