remove passwords from api calls

This commit is contained in:
Scott E. Graves 2025-03-20 08:08:43 -05:00
parent 9b9929e69d
commit c037fd5657
2 changed files with 9 additions and 3 deletions

View File

@ -12,6 +12,7 @@
### Changes from v2.0.4-rc
* Continue documentation updates
* Removed passwords and secret key values from API calls
* Renamed setting `ApiAuth` to `ApiPassword`
* Require `--name,-na` option for encryption provider

View File

@ -47,8 +47,10 @@ void server::handle_get_config(const httplib::Request & /*req*/,
void server::handle_get_config_value_by_name(const httplib::Request &req,
httplib::Response &res) {
auto name = req.get_param_value("name");
auto data = json(
{{"value", clean_json_value(name, config_.get_value_by_name(name))}});
auto data = json({{
"value",
clean_json_value(name, config_.get_value_by_name(name)),
}});
res.set_content(data.dump(), "application/json");
res.status = http_error_codes::ok;
}
@ -58,7 +60,10 @@ void server::handle_set_config_value_by_name(const httplib::Request &req,
auto name = req.get_param_value("name");
auto value = req.get_param_value("value");
json data = {{"value", config_.set_value_by_name(name, value)}};
json data = {{
"value",
clean_json_value(name, config_.set_value_by_name(name, value)),
}};
res.set_content(data.dump(), "application/json");
res.status = http_error_codes::ok;
}