Browse Source

omit http and https ports when using X-Forwarded-Port (#6527)

pull/6528/head
Tom Crasset 1 month ago
committed by GitHub
parent
commit
9ca2b0b763
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      weed/s3api/auth_signature_v4.go

2
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

Loading…
Cancel
Save