omit http and https ports when using X-Forwarded-Port (#6527)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user