remove passwords from api calls
This commit is contained in:
parent
9b9929e69d
commit
c037fd5657
@ -12,6 +12,7 @@
|
|||||||
### Changes from v2.0.4-rc
|
### Changes from v2.0.4-rc
|
||||||
|
|
||||||
* Continue documentation updates
|
* Continue documentation updates
|
||||||
|
* Removed passwords and secret key values from API calls
|
||||||
* Renamed setting `ApiAuth` to `ApiPassword`
|
* Renamed setting `ApiAuth` to `ApiPassword`
|
||||||
* Require `--name,-na` option for encryption provider
|
* Require `--name,-na` option for encryption provider
|
||||||
|
|
||||||
|
@ -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,
|
void server::handle_get_config_value_by_name(const httplib::Request &req,
|
||||||
httplib::Response &res) {
|
httplib::Response &res) {
|
||||||
auto name = req.get_param_value("name");
|
auto name = req.get_param_value("name");
|
||||||
auto data = json(
|
auto data = json({{
|
||||||
{{"value", clean_json_value(name, config_.get_value_by_name(name))}});
|
"value",
|
||||||
|
clean_json_value(name, config_.get_value_by_name(name)),
|
||||||
|
}});
|
||||||
res.set_content(data.dump(), "application/json");
|
res.set_content(data.dump(), "application/json");
|
||||||
res.status = http_error_codes::ok;
|
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 name = req.get_param_value("name");
|
||||||
auto value = req.get_param_value("value");
|
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.set_content(data.dump(), "application/json");
|
||||||
res.status = http_error_codes::ok;
|
res.status = http_error_codes::ok;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user