diff --git a/lib/pleroma/plugs/rate_limiter/rate_limiter.ex b/lib/pleroma/plugs/rate_limiter/rate_limiter.ex index 9d652d85c..1529da717 100644 --- a/lib/pleroma/plugs/rate_limiter/rate_limiter.ex +++ b/lib/pleroma/plugs/rate_limiter/rate_limiter.ex @@ -123,9 +123,6 @@ defmodule Pleroma.Plugs.RateLimiter 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 diff --git a/lib/pleroma/plugs/remote_ip.ex b/lib/pleroma/plugs/remote_ip.ex index a71473e63..0b98a43e2 100644 --- a/lib/pleroma/plugs/remote_ip.ex +++ b/lib/pleroma/plugs/remote_ip.ex @@ -31,11 +31,15 @@ defmodule Pleroma.Plugs.RemoteIp do 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