ensure only pickable frontends can be returned
authorFloatingGhost <hannah@coffee-and-dreams.uk>
Fri, 14 Apr 2023 16:42:40 +0000 (17:42 +0100)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Fri, 14 Apr 2023 16:42:40 +0000 (17:42 +0100)
lib/pleroma/web/plugs/frontend_static.ex

index 1d68614568fb967b479ee4d41de3c0c5b6c1dd06..41b8ba46b90d659a5ba17069f9a8da6eae87076b 100644 (file)
@@ -78,7 +78,11 @@ defmodule Pleroma.Web.Plugs.FrontendStatic do
         :primary
 
       frontend ->
-        frontend
+        if Enum.member?(Pleroma.Config.get([:frontends, :pickable], []), frontend) do
+          frontend
+        else
+          :primary
+        end
     end
   end