Use GetSourceIP for source ip as request params (#6109)

Fixes #6108
This commit is contained in:
Harshavardhana
2018-07-02 14:40:18 -07:00
committed by kannappanr
parent d7ced9a8b5
commit 6c85706c24
5 changed files with 22 additions and 12 deletions

View File

@@ -24,6 +24,7 @@ import (
"time"
"github.com/minio/minio/pkg/event"
"github.com/minio/minio/pkg/handlers"
)
// Validates the preconditions for CopyObjectPart, returns true if CopyObjectPart
@@ -243,7 +244,7 @@ func deleteObject(ctx context.Context, obj ObjectLayer, cache CacheObjectLayer,
}
// Get host and port from Request.RemoteAddr.
host, port, _ := net.SplitHostPort(r.RemoteAddr)
host, port, _ := net.SplitHostPort(handlers.GetSourceIP(r))
// Notify object deleted event.
sendEvent(eventArgs{