foxx1337
03/15/2020, 3:03 PMstatic directories? I got
static("ui") {
resources("swagger-ui")
resource("api.json")
defaultResource("swagger-ui/index.html")
}
and when I browse the server at server/path/to/ui I actually see that index.html file (direct 200, no reidrects) but I see none of the static resources the index.html tries to load (it addresses them like ./resource). Those static resources load just fine if I navigate to server/path/to/ui/ (notice the trailing slash).Gunslingor
03/15/2020, 4:54 PMhead {
title { +"Async World" }
script {
attributes["type"]=ScriptType.textJavaScript
attributes["src"]="resource/three.min.js"
}
}Gunslingor
03/15/2020, 4:55 PMfoxx1337
03/15/2020, 9:53 PMindex.html provided by swagger-ui tries to read images, js and css files by adressing them like img src="./picture.png" . Because ktor doesn't issue the redirect from /path/to/ui towards /path/to/ui/, the browser ends up trying to load /path/to/picture.png instead of /path/to/ui/picture.png.Gunslingor
03/15/2020, 9:55 PMfoxx1337
03/16/2020, 7:34 AMfolder towards folder/.Joe
03/16/2020, 2:46 PMfoxx1337
03/16/2020, 2:48 PMurl + '/').