Skip to content

Commit

Permalink
Fix issue with setting remote IP at connection startup
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrudel committed Sep 9, 2023
1 parent 26900d0 commit b3a0552
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bandit/pipeline.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ defmodule Bandit.Pipeline do
determine_host_and_port(transport_info, version, request_target, headers),
{path, query} <- determine_path_and_query(request_target) do
uri = %URI{scheme: scheme, host: host, port: port, path: path, query: query}
%Bandit.TransportInfo{sockname: {remote_ip, _port}} = transport_info
%Bandit.TransportInfo{peername: {remote_ip, _port}} = transport_info
{:ok, Plug.Conn.Adapter.conn({mod, req}, method, uri, remote_ip, headers)}
end
end
Expand Down

0 comments on commit b3a0552

Please sign in to comment.