1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.Plugs.FederatingPlug do
12 def call(conn, _opts) do
20 def federating?, do: Pleroma.Config.get([:instance, :federating])
22 # Definition for the use in :if_func / :unless_func plug options
23 def federating?(_conn), do: federating?()
28 |> Phoenix.Controller.put_view(Pleroma.Web.ErrorView)
29 |> Phoenix.Controller.render("404.json")