projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[#582] Optimized federation retirement by reducing the number of SQL calls
[akkoma]
/
lib
/
pleroma
/
plugs
/
federating_plug.ex
diff --git
a/lib/pleroma/plugs/federating_plug.ex
b/lib/pleroma/plugs/federating_plug.ex
index 4108d90af267631dbdcedf805396941888bc7430..effc154bf274c26050098012fc7e076f04d5e13e 100644
(file)
--- a/
lib/pleroma/plugs/federating_plug.ex
+++ b/
lib/pleroma/plugs/federating_plug.ex
@@
-1,3
+1,7
@@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.FederatingPlug do
import Plug.Conn
defmodule Pleroma.Web.FederatingPlug do
import Plug.Conn
@@
-5,13
+9,14
@@
defmodule Pleroma.Web.FederatingPlug do
options
end
options
end
- def call(conn, opts) do
+ def call(conn,
_
opts) do
if Keyword.get(Application.get_env(:pleroma, :instance), :federating) do
conn
else
conn
|> put_status(404)
if Keyword.get(Application.get_env(:pleroma, :instance), :federating) do
conn
else
conn
|> put_status(404)
- |> Phoenix.Controller.render(Pleroma.Web.ErrorView, "404.json")
+ |> Phoenix.Controller.put_view(Pleroma.Web.ErrorView)
+ |> Phoenix.Controller.render("404.json")
|> halt()
end
end
|> halt()
end
end