Log Rest api requests

This commit is contained in:
JonatanRek 2020-02-13 13:32:18 +01:00
parent e76b3127f3
commit bc54e33621

View File

@ -38,6 +38,8 @@ Db::connect (DBHOST, DBUSER, DBPASS, DBNAME);
//Read API data
$json = file_get_contents('php://input');
$obj = json_decode($json, true);
$logManager->write("[INFO] Rest API request body" . $json, LogRecordType::INFO);
$logManager->write("[INFO] Rest API request body -> decodet to json" . var_export($obj), LogRecordType::INFO);
//zabespecit proti Ddosu
if (isset($obj['user']) && $obj['user'] != ''){