forked from TrueCloudLab/frostfs-s3-gw
[#18] Return container name in head-bucket response
Signed-off-by: Artem Tataurov <a.tataurov@yadro.com>
This commit is contained in:
parent
f9f52ce8e0
commit
5ee4bf80ae
3 changed files with 4 additions and 1 deletions
|
@ -5,6 +5,7 @@ This document outlines major changes between releases.
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
- Return container name in `head-bucket` response (TrueCloudLab#18)
|
||||||
- Billing metrics (TrueCloudLab#5)
|
- Billing metrics (TrueCloudLab#5)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -123,6 +123,7 @@ func (h *handler) HeadBucketHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Header().Set(api.ContainerID, bktInfo.CID.EncodeToString())
|
w.Header().Set(api.ContainerID, bktInfo.CID.EncodeToString())
|
||||||
|
w.Header().Set(api.ContainerName, bktInfo.Name)
|
||||||
w.Header().Set(api.AmzBucketRegion, bktInfo.LocationConstraint)
|
w.Header().Set(api.AmzBucketRegion, bktInfo.LocationConstraint)
|
||||||
api.WriteResponse(w, http.StatusOK, nil, api.MimeNone)
|
api.WriteResponse(w, http.StatusOK, nil, api.MimeNone)
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,8 @@ const (
|
||||||
AmzServerSideEncryptionCustomerKey = "x-amz-server-side-encryption-customer-key"
|
AmzServerSideEncryptionCustomerKey = "x-amz-server-side-encryption-customer-key"
|
||||||
AmzServerSideEncryptionCustomerKeyMD5 = "x-amz-server-side-encryption-customer-key-MD5"
|
AmzServerSideEncryptionCustomerKeyMD5 = "x-amz-server-side-encryption-customer-key-MD5"
|
||||||
|
|
||||||
ContainerID = "X-Container-Id"
|
ContainerID = "X-Container-Id"
|
||||||
|
ContainerName = "X-Container-Name"
|
||||||
|
|
||||||
AccessControlAllowOrigin = "Access-Control-Allow-Origin"
|
AccessControlAllowOrigin = "Access-Control-Allow-Origin"
|
||||||
AccessControlAllowMethods = "Access-Control-Allow-Methods"
|
AccessControlAllowMethods = "Access-Control-Allow-Methods"
|
||||||
|
|
Loading…
Reference in a new issue