fix: change SetRemoteTarget API to allow editing remote target granularly (#12175)

Currently, only credentials could be updated with
`mc admin bucket remote edit`. 

Allow updating synchronous replication flag, path, 
bandwidth and healthcheck duration on buckets, and
a flag to disable proxying in active-active replication.
This commit is contained in:
Poorna Krishnamoorthy
2021-04-28 15:26:20 -07:00
committed by GitHub
parent 77f9c71133
commit 632252ff1d
5 changed files with 213 additions and 5 deletions

View File

@@ -1049,7 +1049,10 @@ func proxyHeadToRepTarget(ctx context.Context, bucket, object string, opts Objec
if tgt == nil || tgt.isOffline() {
return nil, oi, false, fmt.Errorf("target is offline or not configured")
}
// if proxying explicitly disabled on remote target
if tgt.disableProxy {
return nil, oi, false, nil
}
gopts := miniogo.GetObjectOptions{
VersionID: opts.VersionID,
ServerSideEncryption: opts.ServerSideEncryption,