mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-06-30 17:34:39 -05:00
Exclude web manifest file from requiring authentication (#1414)
This commit is contained in:
@@ -112,8 +112,11 @@ object JavalinSetup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
app.beforeMatched { ctx ->
|
app.beforeMatched { ctx ->
|
||||||
|
val isWebManifest = listOf("site.webmanifest", "manifest.json").any { ctx.path().endsWith(it) }
|
||||||
val isPreFlight = ctx.method() == HandlerType.OPTIONS
|
val isPreFlight = ctx.method() == HandlerType.OPTIONS
|
||||||
if (isPreFlight) {
|
|
||||||
|
val requiresAuthentication = !isPreFlight && !isWebManifest
|
||||||
|
if (!requiresAuthentication) {
|
||||||
return@beforeMatched
|
return@beforeMatched
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user