From 47e54fb823ccc7c5d23089bb6a88decb01190dfb Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Mon, 23 Aug 2021 15:08:11 +0100 Subject: [PATCH] Send bucket name to peers when bucket notification is enabled (#11351) (#13035) Co-authored-by: massintha azamoum <40169489+massintha-riaktr@users.noreply.github.com> --- cmd/listen-notification-handlers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/listen-notification-handlers.go b/cmd/listen-notification-handlers.go index 09bb1e02c..e7eea05e1 100644 --- a/cmd/listen-notification-handlers.go +++ b/cmd/listen-notification-handlers.go @@ -139,6 +139,9 @@ func (api objectAPIHandlers) ListenNotificationHandler(w http.ResponseWriter, r return rulesMap.MatchSimple(ev.EventName, ev.S3.Object.Key) }) + if bucketName != "" { + values.Set(peerRESTListenBucket, bucketName) + } for _, peer := range peers { if peer == nil { continue