aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_http_req.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl
index 057ea4d..7a0e3a7 100644
--- a/src/cowboy_http_req.erl
+++ b/src/cowboy_http_req.erl
@@ -89,8 +89,8 @@ peer_addr(Req = #http_req{}) ->
end
end,
{ok, PeerAddr} = if
- is_binary(RealIp) -> inet_parse:address(RealIp);
- is_binary(ForwardedFor) -> inet_parse:address(ForwardedFor);
+ is_binary(RealIp) -> inet_parse:address(binary_to_list(RealIp));
+ is_binary(ForwardedFor) -> inet_parse:address(binary_to_list(ForwardedFor));
true -> {ok, PeerIp}
end,
{PeerAddr, Req3}.