Merge branch 'master' into develop

This commit is contained in:
mzl
2025-10-16 09:15:53 +08:00
+9 -21
View File
@@ -12,15 +12,15 @@ class CheckWeb
public function onWorkerStart()
{
if (getenv('ENVIRONMENT') === 'master') {
new Crontab('0 */10 * * * *', function(){
$result = $this->tocurl('https://magicbridgeauto.com');
if (!preg_match('/magicbridgeauto/', $result['body'])) {
flg("【magicbridgeauto】疑似被篡改");
}
return true;
});
}
// if (getenv('ENVIRONMENT') === 'master') {
// new Crontab('0 */10 * * * *', function(){
// $result = $this->tocurl('https://magicbridgeauto.com');
// if (!preg_match('/magicbridgeauto/', $result['body'])) {
// flg("【magicbridgeauto】疑似被篡改");
// }
// return true;
// });
// }
new Crontab('*/50 * * * * *', function(){
$userIds = User::where('status', 1)->pluck('id')->toArray();
@@ -36,18 +36,6 @@ class CheckWeb
}
public function check()
{
$result = $this->tocurl('https://magicbridgeauto.com');
if (!preg_match('/magicbridgeauto/', $result['body'])) {
// flg("【magicbridgeauto】未检查到异常");
// } else {
flg("【magicbridgeauto】疑似被篡改");
}
return true;
}
public function tocurl($url, $header = null, $content = null)
{
$ch = curl_init();