Skip to content
Snippets Groups Projects
Verified Commit e61add1a authored by Alexander Strizhakov's avatar Alexander Strizhakov
Browse files

more debug

parent be9f90e7
Branches pleroma-mrf-silence
No related tags found
No related merge requests found
......@@ -123,9 +123,6 @@ def disabled?(conn) do
do: !conn.assigns.remote_ip_found,
else: false
IO.inspect(localhost_or_socket, label: "localhost_or_socket")
IO.inspect(remote_ip_not_found, label: "remote_ip_not_found")
IO.inspect(Map.get(conn.assigns, :remote_ip_found), label: "remote_ip_found")
localhost_or_socket and remote_ip_not_found
end
......
......@@ -31,11 +31,15 @@ def init(_), do: nil
def call(%{remote_ip: original_remote_ip} = conn, _) do
config = Pleroma.Config.get(__MODULE__, [])
IO.inspect(original_remote_ip, label: "original remote ip")
if Keyword.get(config, :enabled, false) do
%{remote_ip: new_remote_ip} = conn = RemoteIp.call(conn, remote_ip_opts(config))
IO.inspect(new_remote_ip, label: "new remote ip")
if original_remote_ip == new_remote_ip do
IO.inspect(conn.request_path, label: "path")
IO.inspect(conn.query_string, label: "query string")
IO.inspect(conn.req_headers, label: "headers")
end
assign(conn, :remote_ip_found, original_remote_ip != new_remote_ip)
else
conn
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment