Add test for an entry without CIDR format
This commit is contained in:
parent
d43d05005a
commit
9783e9cd80
1 changed files with 11 additions and 0 deletions
|
@ -82,4 +82,15 @@ test "custom proxies" do
|
||||||
|
|
||||||
assert conn.remote_ip == {1, 1, 1, 1}
|
assert conn.remote_ip == {1, 1, 1, 1}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "proxies set without CIDR format" do
|
||||||
|
Pleroma.Config.put([RemoteIp, :proxies], ["173.245.48.1"])
|
||||||
|
|
||||||
|
conn =
|
||||||
|
conn(:get, "/")
|
||||||
|
|> put_req_header("x-forwarded-for", "173.245.48.1, 1.1.1.1")
|
||||||
|
|> RemoteIp.call(nil)
|
||||||
|
|
||||||
|
assert conn.remote_ip == {1, 1, 1, 1}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue