mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-23 13:02:34 +01:00
Add cache control header to manga page response (#430)
This commit is contained in:
@@ -315,6 +315,8 @@ object MangaController {
|
|||||||
future { Page.getPageImage(mangaId, chapterIndex, index, useCache) }
|
future { Page.getPageImage(mangaId, chapterIndex, index, useCache) }
|
||||||
.thenApply {
|
.thenApply {
|
||||||
ctx.header("content-type", it.second)
|
ctx.header("content-type", it.second)
|
||||||
|
val httpCacheSeconds = 1.days.inWholeSeconds
|
||||||
|
ctx.header("cache-control", "max-age=$httpCacheSeconds")
|
||||||
it.first
|
it.first
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user