Luis Munoz
06/30/2020, 3:33 AMLuis Munoz
06/30/2020, 3:33 AMspring:
resources:
static-locations[0]: file:src/main/resources/static/
static-locations[1]: classpath:/static/
cache:
period: 0
cachecontrol:
s-max-age: 0
no-store: true
In spring boot it would the above configLuis Munoz
06/30/2020, 3:34 AMstatic("/") {
val root = File("rest-api/webapp")
if(!root.exists()) {
throw RuntimeException("Unable to locate static content")
}
staticRootFolder = root
default("index.html")
}
what I have right nowLuis Munoz
06/30/2020, 3:49 AMLuis Munoz
06/30/2020, 3:49 AMfun Route.defaultWithNoCache(localPath: File) {
get {
if (localPath.isFile) {
call.response.cacheControl(CacheControl.NoCache(CacheControl.Visibility.Private))
call.respond(LocalFileContent(localPath))
}
}
}
Luis Munoz
06/30/2020, 3:50 AMstaticRootFolder
doing that