projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'issue/2036-part-2' into 'develop'
[akkoma]
/
lib
/
pleroma
/
plugs
/
remote_ip.ex
diff --git
a/lib/pleroma/plugs/remote_ip.ex
b/lib/pleroma/plugs/remote_ip.ex
index 0ac9050d0764149e2361811016179f1282b20c82..2eca4f8f669789491870a8d473e79edfabb10a1f 100644
(file)
--- a/
lib/pleroma/plugs/remote_ip.ex
+++ b/
lib/pleroma/plugs/remote_ip.ex
@@
-7,8
+7,6
@@
defmodule Pleroma.Plugs.RemoteIp do
This is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
"""
This is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
"""
- import Plug.Conn
-
@behaviour Plug
@headers ~w[
@behaviour Plug
@headers ~w[
@@
-28,12
+26,11
@@
defmodule Pleroma.Plugs.RemoteIp do
def init(_), do: nil
def init(_), do: nil
- def call(
%{remote_ip: original_remote_ip} =
conn, _) do
+ def call(conn, _) do
config = Pleroma.Config.get(__MODULE__, [])
if Keyword.get(config, :enabled, false) do
config = Pleroma.Config.get(__MODULE__, [])
if Keyword.get(config, :enabled, false) do
- %{remote_ip: new_remote_ip} = conn = RemoteIp.call(conn, remote_ip_opts(config))
- assign(conn, :remote_ip_found, original_remote_ip != new_remote_ip)
+ RemoteIp.call(conn, remote_ip_opts(config))
else
conn
end
else
conn
end