change cachecontrol for server previews to be lower

This commit is contained in:
Lee 2024-04-20 20:00:22 +01:00
parent 17803410bd
commit 0854c9e76a

@ -67,7 +67,7 @@ public class ServerController {
CachedMinecraftServer server = serverService.getServer(platform, hostname);
return ResponseEntity.ok()
.cacheControl(CacheControl.maxAge(1, TimeUnit.HOURS).cachePublic())
.cacheControl(CacheControl.maxAge(5, TimeUnit.MINUTES).cachePublic())
.contentType(MediaType.IMAGE_PNG)
.header(HttpHeaders.CONTENT_DISPOSITION, dispositionHeader.formatted(hostname))
.body(serverService.getServerPreview(server, platform, size));