janvladimirmostert
09/22/2019, 2:15 PMinstall(CachingHeaders) {
options { outgoingContent ->
when (outgoingContent.contentType?.withoutParameters()) {
ContentType.Image.Any -> CachingOptions(CacheControl.MaxAge(maxAgeSeconds = 30 * 24 * 60 * 60))
else -> null
}
}
}
routing {
...
static("/img/") {
resources("/static/img/")
...
}
}