mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 06:59:44 +07:00
OPENIDE Add some links to WhiteListUrls
This commit is contained in:
@@ -61,7 +61,8 @@ object WhiteListUrls {
|
||||
"https://ls.store.amplicode.ru",
|
||||
"https://resources.openide.ru",
|
||||
"https://api.github.com",
|
||||
"https://avatars.githubusercontent.com"
|
||||
"https://avatars.githubusercontent.com",
|
||||
"https://plugin.openbpm.ru"
|
||||
)
|
||||
|
||||
// Collect urls from KnownSchemaIdentifiers.json
|
||||
@@ -190,7 +191,8 @@ object WhiteListUrls {
|
||||
|
||||
@JvmStatic
|
||||
fun isAvailableUrl(url: String): Boolean {
|
||||
if (urls.startWith(url)
|
||||
if (isLocalFile(url)
|
||||
|| urls.startWith(url)
|
||||
|| jsonSchemaUrls.startWith(url)
|
||||
|| OpenIdePersistentUrlStorage.getInstance().getUrls().startWith(url)) {
|
||||
return true
|
||||
@@ -218,6 +220,10 @@ object WhiteListUrls {
|
||||
private fun List<String>.startWith(url: String): Boolean {
|
||||
return this.any { url.startsWith(it, true) }
|
||||
}
|
||||
|
||||
private fun isLocalFile(url: String): Boolean {
|
||||
return url.startsWith("file")
|
||||
}
|
||||
}
|
||||
|
||||
class StubUrlConnection(url: URL): URLConnection(url) {
|
||||
|
||||
Reference in New Issue
Block a user