gateway分配实例策略调整

This commit is contained in:
2026-03-12 08:50:53 +08:00
parent 20f9fe12b0
commit b5fa17e58d
+1 -1
View File
@@ -58,7 +58,7 @@ func GetInstanceAddr(ctx context.Context, name string) (addr string, err error)
return
}
//优先使用客户端IP获取实例(前后端在同一台机器调试)
addr = getInstanceAddrByIp(ctx, g.RequestFromCtx(ctx).GetRemoteIp(), service)
addr = getInstanceAddrByIp(ctx, g.RequestFromCtx(ctx).GetClientIp(), service)
if !g.IsEmpty(addr) {
return
}