added failure event
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
parent
59e2986080
commit
26714a836c
@ -70,7 +70,12 @@ auto server::check_authorization(const httplib::Request &req) -> bool {
|
||||
auth.erase(auth.begin());
|
||||
|
||||
auto pwd = utils::string::join(auth, ':');
|
||||
return (user == config_.get_api_user()) && (pwd == config_.get_api_auth());
|
||||
if ((user != config_.get_api_user()) || (pwd != config_.get_api_auth())) {
|
||||
utils::error::raise_error(function_name, "Authorization failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void server::handle_get_config(const httplib::Request & /*req*/,
|
||||
|
Loading…
x
Reference in New Issue
Block a user