I am trying to add cache control headers to static...
# ktor
r
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
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
Ah. Makes sense. 🤦‍♂️
Any
sounded like one.