diff --git a/bucket-metadata.go b/bucket-metadata.go index e29405e..eec3056 100644 --- a/bucket-metadata.go +++ b/bucket-metadata.go @@ -66,6 +66,7 @@ type BucketStatus struct { Lifecycle MetaStatus `json:"lifecycle"` Notification MetaStatus `json:"notification"` Quota MetaStatus `json:"quota"` + Cors MetaStatus `json:"cors"` Err string `json:"error,omitempty"` } diff --git a/cluster-commands.go b/cluster-commands.go index efa9a47..fe8cd53 100644 --- a/cluster-commands.go +++ b/cluster-commands.go @@ -433,6 +433,7 @@ const ( SRBucketMetaTypeSSEConfig = "sse-config" SRBucketMetaTypeQuotaConfig = "quota-config" SRBucketMetaLCConfig = "lc-config" + SRBucketMetaTypeCors = "cors-config" ) // SRBucketMeta - represents a bucket metadata change that will be copied to a peer. @@ -469,6 +470,9 @@ type SRBucketMeta struct { // ExpiryUpdatedAt - timestamp of last update of expiry rule ExpiryUpdatedAt time.Time `json:"expiryUpdatedAt,omitempty"` + + // Cors is base64 XML representation of CORS config + Cors *string `json:"cors,omitempty"` } // SRPeerReplicateBucketMeta - copies a bucket metadata change to a peer cluster. @@ -540,6 +544,7 @@ type SRBucketInfo struct { ExpiryLCConfigUpdatedAt time.Time `json:"expLCTimestamp,omitempty"` CreatedAt time.Time `json:"bucketTimestamp,omitempty"` DeletedAt time.Time `json:"bucketDeletedTimestamp,omitempty"` + CorsConfigUpdatedAt time.Time `json:"corsTimestamp,omitempty"` Location string `json:"location,omitempty"` }