aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Crasset <25140344+tcrasset@users.noreply.github.com>2025-02-07 19:55:09 +0100
committerGitHub <noreply@github.com>2025-02-07 10:55:09 -0800
commit9ca2b0b763e8e546bf9773191f591f079e2b3ce8 (patch)
tree35b922fc5b73d49112aae8ed33889aee1a53d96e
parenta7b964af96cd6bc07fc89571cc5f3f8048464cb3 (diff)
downloadseaweedfs-9ca2b0b763e8e546bf9773191f591f079e2b3ce8.tar.xz
seaweedfs-9ca2b0b763e8e546bf9773191f591f079e2b3ce8.zip
omit http and https ports when using X-Forwarded-Port (#6527)
-rw-r--r--weed/s3api/auth_signature_v4.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/s3api/auth_signature_v4.go b/weed/s3api/auth_signature_v4.go
index 43ca851fc..7ee761a67 100644
--- a/weed/s3api/auth_signature_v4.go
+++ b/weed/s3api/auth_signature_v4.go
@@ -711,7 +711,7 @@ func extractHostHeader(r *http.Request) string {
// If X-Forwarded-Port is set, use that too to form the host.
if forwardedHost != "" {
extractedHost := forwardedHost
- if forwardedPort != "" {
+ if forwardedPort != "" && forwardedPort != "80" && forwardedPort != "443" {
extractedHost = forwardedHost + ":" + forwardedPort
}
return extractedHost