Log Rest api requests
This commit is contained in:
parent
e76b3127f3
commit
bc54e33621
2
api.php
2
api.php
@ -38,6 +38,8 @@ Db::connect (DBHOST, DBUSER, DBPASS, DBNAME);
|
|||||||
//Read API data
|
//Read API data
|
||||||
$json = file_get_contents('php://input');
|
$json = file_get_contents('php://input');
|
||||||
$obj = json_decode($json, true);
|
$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
|
//zabespecit proti Ddosu
|
||||||
if (isset($obj['user']) && $obj['user'] != ''){
|
if (isset($obj['user']) && $obj['user'] != ''){
|
||||||
|
Loading…
Reference in New Issue
Block a user