Require authentication for api_stats_query_types

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2021-01-11 20:02:06 +01:00
parent c8d2e74bfb
commit a1ec17cca2
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
1 changed files with 7 additions and 0 deletions

View File

@ -557,6 +557,13 @@ int api_stats_upstreams(struct mg_connection *conn)
int api_stats_query_types(struct mg_connection *conn)
{
// Verify requesting client is allowed to see this ressource
if(check_client_auth(conn) < 0)
{
return send_json_unauthorized(conn);
}
// Send response
cJSON *json = JSON_NEW_ARRAY();
for(int i = TYPE_A; i < TYPE_MAX; i++)
{