1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-17 18:49:15 +00:00

config: allow relaying to be disabled

This commit is contained in:
William Pitcock 2018-08-06 06:18:15 +00:00
parent b7ca7f282a
commit 7bed350a23
2 changed files with 8 additions and 4 deletions

View file

@ -59,6 +59,7 @@
upload_limit: 16_000_000,
registrations_open: true,
federating: true,
allow_relay: true,
rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
public: true,
quarantined_instances: []

View file

@ -5,6 +5,7 @@ defmodule Pleroma.Web.Router do
@instance Application.get_env(:pleroma, :instance)
@federating Keyword.get(@instance, :federating)
@allow_relay Keyword.get(@instance, :allow_relay)
@public Keyword.get(@instance, :public)
@registrations_open Keyword.get(@instance, :registrations_open)
@ -318,10 +319,12 @@ def user_fetcher(username) do
end
if @federating do
scope "/", Pleroma.Web.ActivityPub do
# XXX: not really ostatus either
pipe_through(:ostatus)
get("/", ActivityPubController, :relay)
if @allow_relay do
scope "/", Pleroma.Web.ActivityPub do
# XXX: not really ostatus either
pipe_through(:ostatus)
get("/", ActivityPubController, :relay)
end
end
scope "/", Pleroma.Web.ActivityPub do