1
0
mirror of https://github.com/minio/mc.git synced 2025-11-12 01:02:26 +03:00

Allow remote target endpoint to point to different host (#4012)

This commit is contained in:
Poorna
2022-03-08 17:42:16 -08:00
committed by GitHub
parent def1988b92
commit bd00af5a71

View File

@@ -177,9 +177,6 @@ func modifyRemoteTarget(cli *cli.Context, targets []madmin.BucketTarget) (*madmi
} }
console.SetColor(cred, color.New(color.FgYellow, color.Italic)) console.SetColor(cred, color.New(color.FgYellow, color.Italic))
creds := &madmin.Credentials{AccessKey: accessKey, SecretKey: secretKey} creds := &madmin.Credentials{AccessKey: accessKey, SecretKey: secretKey}
if host != bktTarget.Endpoint {
fatalIf(errInvalidArgument().Trace(args...), "configured Endpoint `"+host+"` does not match "+bktTarget.Endpoint+"` for this ARN `"+bktTarget.Arn+"`")
}
if tgtBucket != bktTarget.TargetBucket { if tgtBucket != bktTarget.TargetBucket {
fatalIf(errInvalidArgument().Trace(args...), "configured remote target bucket `"+tgtBucket+"` does not match "+bktTarget.TargetBucket+"` for this ARN `"+bktTarget.Arn+"`") fatalIf(errInvalidArgument().Trace(args...), "configured remote target bucket `"+tgtBucket+"` does not match "+bktTarget.TargetBucket+"` for this ARN `"+bktTarget.Arn+"`")
} }