Skip to content

Commit

Permalink
perf: safe remote
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Jan 31, 2024
1 parent c2710ba commit e41064c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/src/main/kotlin/li/songe/gkd/util/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ fun isSafeUrl(url: String): Boolean {
} catch (e: Exception) {
return false
}
return if (u.host == "s.gkd.li") {
true
} else (u.host.endsWith(".jsdelivr.net") && (u.encodedPath.startsWith("/npm/@gkd-kit/") || u.encodedPath.startsWith(
return (u.host.endsWith(".jsdelivr.net") && (u.encodedPath.startsWith("/npm/@gkd-kit/") || u.encodedPath.startsWith(
"/gh/gkd-kit/"
)))
}

0 comments on commit e41064c

Please sign in to comment.