aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/auth_signature_v4_test.go
diff options
context:
space:
mode:
authorzuzuviewer <750938164@qq.com>2025-10-30 09:01:18 +0800
committerGitHub <noreply@github.com>2025-10-29 18:01:18 -0700
commit7e624d53550d3f6a87c4c2ac6f887e89c40e0465 (patch)
treeb797c78bcfe33c8987f569ca16fee6878eee64d6 /weed/s3api/auth_signature_v4_test.go
parenteaecd8328b6e76068381d86098647decda11d8c1 (diff)
downloadseaweedfs-7e624d53550d3f6a87c4c2ac6f887e89c40e0465.tar.xz
seaweedfs-7e624d53550d3f6a87c4c2ac6f887e89c40e0465.zip
* Fix s3 auth with proxy request (#7403)
* * Fix s3 auth with proxy request * * 6649 Add unit test for signature v4 * address comments * fix for tests * ipv6 * address comments * setting scheme Works for both cases (direct HTTPS and behind proxy) * trim for ipv6 * Corrected Scheme Precedence Order * trim * accurate --------- Co-authored-by: chrislu <chris.lu@gmail.com> Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Diffstat (limited to 'weed/s3api/auth_signature_v4_test.go')
-rw-r--r--weed/s3api/auth_signature_v4_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/s3api/auth_signature_v4_test.go b/weed/s3api/auth_signature_v4_test.go
index 16f3840c0..6850e9d2b 100644
--- a/weed/s3api/auth_signature_v4_test.go
+++ b/weed/s3api/auth_signature_v4_test.go
@@ -216,12 +216,12 @@ func TestExtractHostHeader(t *testing.T) {
expected: "[2001:db8::1]:8080",
},
{
- name: "IPv6 full address with brackets and port",
+ name: "IPv6 full address with brackets and default port (should strip port)",
hostHeader: "backend:8333",
forwardedHost: "[2001:db8:85a3::8a2e:370:7334]:443",
forwardedPort: "443",
forwardedProto: "https",
- expected: "[2001:db8:85a3::8a2e:370:7334]:443",
+ expected: "[2001:db8:85a3::8a2e:370:7334]",
},
{
name: "IPv4-mapped IPv6 address without brackets, should add brackets with port",