relay: reintroduce @allow_relay
authorWilliam Pitcock <nenolod@dereferenced.org>
Mon, 6 Aug 2018 08:20:21 +0000 (08:20 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Mon, 6 Aug 2018 08:22:18 +0000 (08:22 +0000)
lib/pleroma/web/router.ex

index 48c3fb9a56af8e8a25fe7ab3f31865078a6e8651..eb9860864e77a8ebc69da1c0bd043b58ca5ee1f1 100644 (file)
@@ -323,9 +323,11 @@ defmodule Pleroma.Web.Router do
   end
 
   if @federating do
-    scope "/relay", Pleroma.Web.ActivityPub do
-      pipe_through(:ap_relay)
-      get("/", ActivityPubController, :relay)
+    if @allow_relay do
+      scope "/relay", Pleroma.Web.ActivityPub do
+        pipe_through(:ap_relay)
+        get("/", ActivityPubController, :relay)
+      end
     end
 
     scope "/", Pleroma.Web.ActivityPub do