fix: remove global route that was intercepting log/report controller
This commit is contained in:
@@ -15,19 +15,3 @@ Route::get('think', function () {
|
||||
});
|
||||
|
||||
Route::get('hello/:name', 'index/hello');
|
||||
|
||||
Route::post('log/report', function () {
|
||||
$data = request()->post();
|
||||
\app\utils\Logger::error(\app\utils\Logger::CAT_FRONTEND, $data['message'] ?? 'unknown', [
|
||||
'source' => $data['source'] ?? 'unknown',
|
||||
'type' => $data['type'] ?? 'error',
|
||||
'stack' => isset($data['stack']) ? substr($data['stack'], 0, 2000) : '',
|
||||
'file' => $data['file'] ?? '',
|
||||
'url' => $data['url'] ?? '',
|
||||
'line' => $data['line'] ?? '',
|
||||
'col' => $data['col'] ?? '',
|
||||
'ua' => request()->header('user-agent', ''),
|
||||
'ip' => request()->ip(),
|
||||
]);
|
||||
return json(['status' => 1]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user