mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-14 22:15:59 +08:00
@@ -182,9 +182,6 @@ func checkMongo() error {
|
|||||||
|
|
||||||
func checkMinio() error {
|
func checkMinio() error {
|
||||||
if config.Config.Object.Enable == "minio" {
|
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
|
conf := config.Config.Object.Minio
|
||||||
u, _ := url.Parse(conf.Endpoint)
|
u, _ := url.Parse(conf.Endpoint)
|
||||||
minioClient, err := minio.New(u.Host, &minio.Options{
|
minioClient, err := minio.New(u.Host, &minio.Options{
|
||||||
@@ -204,6 +201,9 @@ func checkMinio() error {
|
|||||||
}
|
}
|
||||||
cancel()
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user