From c22361b8e7959e114db6f657942b4404e2a7c9dd Mon Sep 17 00:00:00 2001 From: xuwenfeng Date: Wed, 3 Jul 2024 12:52:33 +0800 Subject: [PATCH] ip port conact --- weed/server/volume_server_handlers_read.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weed/server/volume_server_handlers_read.go b/weed/server/volume_server_handlers_read.go index 503159180d7..776e5128546 100644 --- a/weed/server/volume_server_handlers_read.go +++ b/weed/server/volume_server_handlers_read.go @@ -81,9 +81,10 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) } if vs.ReadMode == "proxy" { // proxy client request to target server + localUrl := fmt.Sprintf("%s:%d", vs.store.Ip, vs.store.Port) var proxyIp string for _, loc := range lookupResult.Locations { - if vs.store.Ip == loc.Url { + if localUrl == loc.Url { continue } proxyIp = loc.Url