From 5a5259ad6c5b48fea04dcc1e4683b18b3f747029 Mon Sep 17 00:00:00 2001 From: hanzhixiao <709674996@qq.com> Date: Thu, 10 Aug 2023 16:44:56 +0800 Subject: [PATCH] 815 Signed-off-by: hanzhixiao <709674996@qq.com> --- tools/component/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/component/main.go b/tools/component/main.go index 42a4d8774..68a4b7877 100644 --- a/tools/component/main.go +++ b/tools/component/main.go @@ -182,9 +182,6 @@ func checkMongo() error { func checkMinio() error { if config.Config.Object.Enable == "minio" { - if exactIP(config.Config.Object.ApiURL) == "127.0.0.1" || exactIP(config.Config.Object.Minio.Endpoint) == "127.0.0.1" { - return ErrConfig.Wrap("apiURL or Minio endpoint contain 127.0.0.1.") - } conf := config.Config.Object.Minio u, _ := url.Parse(conf.Endpoint) minioClient, err := minio.New(u.Host, &minio.Options{ @@ -204,6 +201,9 @@ func checkMinio() error { } cancel() } + if exactIP(config.Config.Object.ApiURL) == "127.0.0.1" || exactIP(config.Config.Object.Minio.Endpoint) == "127.0.0.1" { + return ErrConfig.Wrap("apiURL or Minio endpoint contain 127.0.0.1.") + } } return nil }