config: allow relaying to be disabled
This commit is contained in:
parent
b7ca7f282a
commit
7bed350a23
@ -59,6 +59,7 @@ config :pleroma, :instance,
|
|||||||
upload_limit: 16_000_000,
|
upload_limit: 16_000_000,
|
||||||
registrations_open: true,
|
registrations_open: true,
|
||||||
federating: true,
|
federating: true,
|
||||||
|
allow_relay: true,
|
||||||
rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
|
rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
|
||||||
public: true,
|
public: true,
|
||||||
quarantined_instances: []
|
quarantined_instances: []
|
||||||
|
@ -5,6 +5,7 @@ defmodule Pleroma.Web.Router do
|
|||||||
|
|
||||||
@instance Application.get_env(:pleroma, :instance)
|
@instance Application.get_env(:pleroma, :instance)
|
||||||
@federating Keyword.get(@instance, :federating)
|
@federating Keyword.get(@instance, :federating)
|
||||||
|
@allow_relay Keyword.get(@instance, :allow_relay)
|
||||||
@public Keyword.get(@instance, :public)
|
@public Keyword.get(@instance, :public)
|
||||||
@registrations_open Keyword.get(@instance, :registrations_open)
|
@registrations_open Keyword.get(@instance, :registrations_open)
|
||||||
|
|
||||||
@ -318,11 +319,13 @@ defmodule Pleroma.Web.Router do
|
|||||||
end
|
end
|
||||||
|
|
||||||
if @federating do
|
if @federating do
|
||||||
|
if @allow_relay do
|
||||||
scope "/", Pleroma.Web.ActivityPub do
|
scope "/", Pleroma.Web.ActivityPub do
|
||||||
# XXX: not really ostatus either
|
# XXX: not really ostatus either
|
||||||
pipe_through(:ostatus)
|
pipe_through(:ostatus)
|
||||||
get("/", ActivityPubController, :relay)
|
get("/", ActivityPubController, :relay)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
scope "/", Pleroma.Web.ActivityPub do
|
scope "/", Pleroma.Web.ActivityPub do
|
||||||
pipe_through(:activitypub)
|
pipe_through(:activitypub)
|
||||||
|
Loading…
Reference in New Issue
Block a user