1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-13 17:56:20 +00:00

Theme images expiration date

This commit is contained in:
jendib
2016-05-08 23:31:33 +02:00
parent 6f89a50fe5
commit f41dafe76d

View File

@@ -26,6 +26,8 @@ import java.io.OutputStream;
import java.io.StringReader;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
/**
@@ -176,6 +178,7 @@ public class ThemeResource extends BaseResource {
}
})
.header("Content-Type", "image/*")
.header("Expires", new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z").format(new Date().getTime() + 3600000 * 24 * 15))
.build();
}