Replace use of deprecated static/resources methods

Signed-off-by: Graham <gpe@openrs2.org>
Graham 1 year ago
parent 651b2f8b5f
commit 0b6610c062
  1. 5
      archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt

@ -9,8 +9,7 @@ import io.ktor.server.application.call
import io.ktor.server.application.createApplicationPlugin
import io.ktor.server.application.install
import io.ktor.server.engine.embeddedServer
import io.ktor.server.http.content.resources
import io.ktor.server.http.content.static
import io.ktor.server.http.content.staticResources
import io.ktor.server.jetty.Jetty
import io.ktor.server.plugins.autohead.AutoHeadResponse
import io.ktor.server.plugins.cachingheaders.CachingHeaders
@ -89,7 +88,7 @@ public class WebServer @Inject constructor(
post("/keys") { keysController.import(call) }
get("/keys/all.json") { keysController.exportAll(call) }
get("/keys/valid.json") { keysController.exportValid(call) }
static("/static") { resources("/org/openrs2/archive/static") }
staticResources("/static", "/org/openrs2/archive/static")
// compatibility redirects
get("/caches/{id}") { redirect(call, permanent = true, "/caches/runescape/{id}") }

Loading…
Cancel
Save