diff --git a/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt index 12a0bc55..f1c60b66 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt @@ -168,9 +168,13 @@ object JavalinSetup { app.beforeMatched { ctx -> val isWebManifest = listOf("site.webmanifest", "manifest.json", "login.html").any { ctx.path().endsWith(it) } + val isPageIcon = + ctx.path().startsWith('/') && + !ctx.path().substring(1).contains('/') && + listOf(".png", ".jpg", ".ico").any { ctx.path().endsWith(it) } val isPreFlight = ctx.method() == HandlerType.OPTIONS - val requiresAuthentication = !isPreFlight && !isWebManifest + val requiresAuthentication = !isPreFlight && !isPageIcon && !isWebManifest if (!requiresAuthentication) { return@beforeMatched }