projects
/
akkoma
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge branch '459_fix_user_profile_crash' into 'develop'
[akkoma]
/
lib
/
pleroma
/
plugs
/
federating_plug.ex
1
defmodule Pleroma.Web.FederatingPlug do
2
import Plug.Conn
3
4
def init(options) do
5
options
6
end
7
8
def call(conn, _opts) do
9
if Keyword.get(Application.get_env(:pleroma, :instance), :federating) do
10
conn
11
else
12
conn
13
|> put_status(404)
14
|> Phoenix.Controller.put_view(Pleroma.Web.ErrorView)
15
|> Phoenix.Controller.render("404.json")
16
|> halt()
17
end
18
end
19
end