Incident ids

This commit is contained in:
XlXi 2020-12-14 00:01:53 -05:00
parent 986791fea1
commit 335d8fb4f5
2 changed files with 5 additions and 1 deletions

View File

@ -16,9 +16,12 @@ class API {
}
function InvokeError($errorCode, $message) {
$incident = md5(time()*8^42);
$incidentRand = ["azrt4o", "30jg49k", "nigm4gd"];
$incident = substr_replace($incident, $incidentRand[array_rand($incidentRand)], 15, 0);
http_response_code($errorCode);
header("Content-Type: application/json");
exit(API::PrettyJSONEncode(["error"=>"$message"]));
exit(API::PrettyJSONEncode(["error"=>"$message", "incidentID"=>$incident]));
}
function PrettyJSONEncode($array){

1
public/cdn/www/.htaccess Normal file
View File

@ -0,0 +1 @@
ErrorDocument 404 /index.php