PKGS-435 Allow to install plugin from Package Search website
authorJakub Chrzanowski <jakub.chrzanowski@jetbrains.com>
Tue, 31 Mar 2020 08:10:45 +0000 (10:10 +0200)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Tue, 31 Mar 2020 13:02:08 +0000 (13:02 +0000)
GitOrigin-RevId: 1ad13ff4325f6c5834c5d483940720cb5d68cf2e

platform/built-in-server/src/org/jetbrains/ide/InstallPluginService.kt

index d5eb39b934405c327cd4c0626cb1dfffa3e63ade..451e839a08873d2b24351e7da034a177eefabe1d 100644 (file)
@@ -136,10 +136,9 @@ internal class InstallPluginService : RestService() {
       LOG.error("Expected 'request.hostName' to be localhost. hostName='$hostName', origin='$origin'")
     }
 
-    return (originHost != null &&
-            (originHost == "plugins.jetbrains.com" ||
-             originHost.endsWith(".dev.marketplace.intellij.net") ||
-             NetUtils.isLocalhost(originHost))) ||
-           super.isHostTrusted(request, urlDecoder)
+    return (originHost != null && (
+      listOf("plugins.jetbrains.com", "package-search.services.jetbrains.com", "package-search.jetbrains.com").contains(originHost) ||
+      originHost.endsWith(".dev.marketplace.intellij.net") ||
+      NetUtils.isLocalhost(originHost))) || super.isHostTrusted(request, urlDecoder)
   }
-}
\ No newline at end of file
+}