mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
[RPC] pass HTTP basic authentication username to the JSONRequest object
This commit is contained in:
@@ -286,6 +286,7 @@ static bool rest_chaininfo(HTTPRequest* req, const std::string& strURIPart)
|
||||
switch (rf) {
|
||||
case RF_JSON: {
|
||||
JSONRPCRequest jsonRequest;
|
||||
jsonRequest.params = UniValue(UniValue::VARR);
|
||||
UniValue chainInfoObject = getblockchaininfo(jsonRequest);
|
||||
string strJSON = chainInfoObject.write() + "\n";
|
||||
req->WriteHeader("Content-Type", "application/json");
|
||||
|
||||
Reference in New Issue
Block a user