https://kotlinlang.org logo
#ktor
Title
# ktor
r

rahulrav

07/25/2019, 12:11 PM
I am trying to add cache control headers to static pages served via the
resources
handler. For some reason I don’t see the correct response headers. What am I doing wrong ? https://github.com/tikurahul/rahulrav-com/blob/master/src/main/kotlin/com/rahulrav/Application.kt#L47 https://github.com/tikurahul/rahulrav-com/blob/master/src/main/kotlin/com/rahulrav/RequestHandlers.kt#L25
1
c

cy

07/25/2019, 5:11 PM
For sure it won't work for images because a content type is never equals to
ContentType.Image.Any
Use
match
instead for wildcards
r

rahulrav

07/26/2019, 1:16 PM
Ah. Makes sense. 🤦‍♂️
Any
sounded like one.
7 Views