Browse Source
omit http and https ports when using X-Forwarded-Port (#6527)
pull/6528/head
Tom Crasset
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
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 |
|
|
|