mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-04-05 20:52:50 +08:00
omit http and https ports when using X-Forwarded-Port (#6527)
Some checks failed
go: build dev binaries / cleanup (push) Has been cancelled
docker: build dev containers / build-dev-containers (push) Has been cancelled
End to End / FUSE Mount (push) Has been cancelled
go: build binary / Build (push) Has been cancelled
Ceph S3 tests / Ceph S3 tests (push) Has been cancelled
go: build dev binaries / build_dev_linux_windows (amd64, linux) (push) Has been cancelled
go: build dev binaries / build_dev_linux_windows (amd64, windows) (push) Has been cancelled
go: build dev binaries / build_dev_darwin (amd64, darwin) (push) Has been cancelled
go: build dev binaries / build_dev_darwin (arm64, darwin) (push) Has been cancelled
Some checks failed
go: build dev binaries / cleanup (push) Has been cancelled
docker: build dev containers / build-dev-containers (push) Has been cancelled
End to End / FUSE Mount (push) Has been cancelled
go: build binary / Build (push) Has been cancelled
Ceph S3 tests / Ceph S3 tests (push) Has been cancelled
go: build dev binaries / build_dev_linux_windows (amd64, linux) (push) Has been cancelled
go: build dev binaries / build_dev_linux_windows (amd64, windows) (push) Has been cancelled
go: build dev binaries / build_dev_darwin (amd64, darwin) (push) Has been cancelled
go: build dev binaries / build_dev_darwin (arm64, darwin) (push) Has been cancelled
This commit is contained in:
parent
a7b964af96
commit
9ca2b0b763
@ -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…
Reference in New Issue
Block a user