more debug
This commit is contained in:
parent
be9f90e755
commit
e61add1a34
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user