mirror of
https://github.com/minio/minio.git
synced 2025-04-21 11:04:20 -04:00
Set expected expiry date for ExpiredObjectAllVersions (#19210)
This commit is contained in:
parent
dae9dc4847
commit
c26b8d4eb8
@ -515,7 +515,7 @@ func ExpectedExpiryTime(modTime time.Time, days int) time.Time {
|
|||||||
func (lc Lifecycle) SetPredictionHeaders(w http.ResponseWriter, obj ObjectOpts) {
|
func (lc Lifecycle) SetPredictionHeaders(w http.ResponseWriter, obj ObjectOpts) {
|
||||||
event := lc.eval(obj, time.Time{})
|
event := lc.eval(obj, time.Time{})
|
||||||
switch event.Action {
|
switch event.Action {
|
||||||
case DeleteAction, DeleteVersionAction:
|
case DeleteAction, DeleteVersionAction, DeleteAllVersionsAction:
|
||||||
w.Header()[xhttp.AmzExpiration] = []string{
|
w.Header()[xhttp.AmzExpiration] = []string{
|
||||||
fmt.Sprintf(`expiry-date="%s", rule-id="%s"`, event.Due.Format(http.TimeFormat), event.RuleID),
|
fmt.Sprintf(`expiry-date="%s", rule-id="%s"`, event.Due.Format(http.TimeFormat), event.RuleID),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user