Make the expires option set Expires and Cache-Control headers

This commit is contained in:
DarthSim
2023-02-24 19:44:03 +03:00
parent 41b9cfbc6e
commit 50d04d585e
4 changed files with 18 additions and 4 deletions

View File

@@ -95,6 +95,8 @@ type ProcessingOptions struct {
CacheBuster string
Expires *time.Time
Watermark WatermarkOptions
PreferWebP bool
@@ -826,6 +828,9 @@ func applyExpiresOption(po *ProcessingOptions, args []string) error {
return errExpiredURL
}
expires := time.Unix(timestamp, 0)
po.Expires = &expires
return nil
}