mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
Add option to set X-User header value for forwarded requests (#1425)
Fixes #1422.
This commit is contained in:
@@ -93,7 +93,7 @@ public:
|
||||
auto toForward = ctx.params;
|
||||
toForward["command"] = ctx.method;
|
||||
|
||||
auto res = balancer_->forwardToRippled(toForward, ctx.clientIp, ctx.yield);
|
||||
auto res = balancer_->forwardToRippled(toForward, ctx.clientIp, ctx.isAdmin, ctx.yield);
|
||||
if (not res) {
|
||||
notifyFailedToForward(ctx.method);
|
||||
return Result{Status{RippledError::rpcFAILED_TO_FORWARD}};
|
||||
|
||||
@@ -222,7 +222,7 @@ public:
|
||||
}
|
||||
|
||||
auto const serverInfoRippled =
|
||||
balancer_->forwardToRippled({{"command", "server_info"}}, ctx.clientIp, ctx.yield);
|
||||
balancer_->forwardToRippled({{"command", "server_info"}}, ctx.clientIp, ctx.isAdmin, ctx.yield);
|
||||
|
||||
if (serverInfoRippled && !serverInfoRippled->contains(JS(error))) {
|
||||
if (serverInfoRippled->contains(JS(result)) &&
|
||||
|
||||
Reference in New Issue
Block a user