mirror of
https://github.com/minio/minio.git
synced 2025-03-29 08:43:40 -04:00
simplify site replication multipart proxying (#19885)
This commit is contained in:
parent
4148754ce0
commit
850a84b08a
@ -967,7 +967,7 @@ var errorCodes = errorCodeMap{
|
|||||||
ErrReplicationRemoteConnectionError: {
|
ErrReplicationRemoteConnectionError: {
|
||||||
Code: "XMinioAdminReplicationRemoteConnectionError",
|
Code: "XMinioAdminReplicationRemoteConnectionError",
|
||||||
Description: "Remote service connection error",
|
Description: "Remote service connection error",
|
||||||
HTTPStatusCode: http.StatusNotFound,
|
HTTPStatusCode: http.StatusServiceUnavailable,
|
||||||
},
|
},
|
||||||
ErrReplicationBandwidthLimitError: {
|
ErrReplicationBandwidthLimitError: {
|
||||||
Code: "XMinioAdminReplicationBandwidthLimitError",
|
Code: "XMinioAdminReplicationBandwidthLimitError",
|
||||||
|
@ -601,13 +601,6 @@ func setUploadForwardingMiddleware(h http.Handler) http.Handler {
|
|||||||
h.ServeHTTP(w, r)
|
h.ServeHTTP(w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// forward request to peer handling this upload
|
|
||||||
if globalBucketTargetSys.isOffline(remote.EndpointURL) {
|
|
||||||
defer logger.AuditLog(r.Context(), w, r, mustGetClaimsFromToken(r))
|
|
||||||
writeErrorResponse(r.Context(), w, errorCodes.ToAPIErr(ErrReplicationRemoteConnectionError), r.URL)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
r.URL.Scheme = remote.EndpointURL.Scheme
|
r.URL.Scheme = remote.EndpointURL.Scheme
|
||||||
r.URL.Host = remote.EndpointURL.Host
|
r.URL.Host = remote.EndpointURL.Host
|
||||||
// Make sure we remove any existing headers before
|
// Make sure we remove any existing headers before
|
||||||
|
Loading…
x
Reference in New Issue
Block a user