Exclude web manifest file from requiring authentication (#1414)

This commit is contained in:
schroda
2025-05-27 02:46:02 +02:00
committed by GitHub
parent 89421946af
commit a9e03837a3
@@ -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
}