From a9e03837a37c192a877541f9dd8d1a1a2104ce9e Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Tue, 27 May 2025 02:46:02 +0200 Subject: [PATCH] Exclude web manifest file from requiring authentication (#1414) --- .../main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt index 355ddbc4..64b451b7 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt @@ -112,8 +112,11 @@ object JavalinSetup { } app.beforeMatched { ctx -> + val isWebManifest = listOf("site.webmanifest", "manifest.json").any { ctx.path().endsWith(it) } val isPreFlight = ctx.method() == HandlerType.OPTIONS - if (isPreFlight) { + + val requiresAuthentication = !isPreFlight && !isWebManifest + if (!requiresAuthentication) { return@beforeMatched }