mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Support multiple proxies in X-Forwarded-For header
This commit is contained in:
committed by
Nik Bougalis
parent
6cda070fe0
commit
ade1afe1b0
@@ -82,6 +82,11 @@ class Roles_test : public beast::unit_test::suite
|
||||
rpcRes = env.rpc(headers, "ping")["result"];
|
||||
BEAST_EXPECT(rpcRes["ip"] == "55.66.77.88");
|
||||
|
||||
headers["Forwarded"] = "what=where;for=55.66.77.88, 99.00.11.22;"
|
||||
"who=3";
|
||||
rpcRes = env.rpc(headers, "ping")["result"];
|
||||
BEAST_EXPECT(rpcRes["ip"] == "55.66.77.88");
|
||||
|
||||
wsRes = makeWSClient(
|
||||
env.app().config(), true, 2, headers)->invoke("ping")["result"];
|
||||
BEAST_EXPECT(
|
||||
|
||||
Reference in New Issue
Block a user