Merge branch 'bugfix/ostatus-as2-reflection' into 'develop'
[akkoma] / lib / pleroma / web / activity_pub / activity_pub_controller.ex
index 531e98237a1abb537da41ffbdb0f9010e93ecea3..3570a75cb37f623d3424a336c5ad830e1eaae858 100644 (file)
@@ -6,16 +6,16 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
   alias Pleroma.Web.ActivityPub.Relay
   alias Pleroma.Web.ActivityPub.Utils
   alias Pleroma.Web.Federator
-  alias Pleroma.Config
 
   require Logger
 
   action_fallback(:errors)
 
+  plug(Pleroma.Web.FederatingPlug when action in [:inbox, :relay])
   plug(:relay_active? when action in [:relay])
 
   def relay_active?(conn, _) do
-    if Config.get([:instance, :allow_relay]) do
+    if Keyword.get(Application.get_env(:pleroma, :instance), :allow_relay) do
       conn
     else
       conn