Exemple #1
0
 public function actionCsp()
 {
     $content = file_get_contents("php://input");
     if (!$content && isset($GLOBALS['HTTP_RAW_POST_DATA'])) {
         $content = $GLOBALS['HTTP_RAW_POST_DATA'];
     }
     AppLogService::addCspReport($content);
 }
Exemple #2
0
 public function actionCapture()
 {
     $referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
     $url = $this->post("url", "");
     $message = $this->post("message", "");
     $error = $this->post("error", "");
     $err_msg = "JS ERROR:[url:{$referer}],[js_file:{$url}],[error:{$message}],[error_info:{$error}]";
     AppLogService::addErrorLog("app-admin", $referer, $err_msg);
 }