Add cache control header to manga page response (#430)

This commit is contained in:
Valter Martinek
2022-10-29 20:49:19 +02:00
committed by GitHub
parent 6d88d90659
commit 23f0876c00

View File

@@ -315,6 +315,8 @@ object MangaController {
future { Page.getPageImage(mangaId, chapterIndex, index, useCache) }
.thenApply {
ctx.header("content-type", it.second)
val httpCacheSeconds = 1.days.inWholeSeconds
ctx.header("cache-control", "max-age=$httpCacheSeconds")
it.first
}
)