...
|
...
|
@@ -339,7 +339,7 @@ public function deleteDirectory($path) |
|
|
* @param array $files
|
|
|
* @return string
|
|
|
*/
|
|
|
public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRAFFICZERO,$files = []){
|
|
|
public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRAFFICZERO){
|
|
|
if($request->getClientIp() == "127.0.0.1"){
|
|
|
return $this->success();
|
|
|
}
|
...
|
...
|
@@ -359,13 +359,16 @@ public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRA |
|
|
$req["domain"] = $request->getHost();
|
|
|
$req["ip"] = $request->getClientIp();
|
|
|
$req["user_agent"] = $request->userAgent();
|
|
|
$req["files"] = $files;
|
|
|
$req["files"] = isset($data["files"]) ? $data["files"] : null;
|
|
|
$req["type"] = $type;
|
|
|
$req["traffic"] = $traffic;
|
|
|
|
|
|
@file_put_contents(storage_path('logs/notify_send.log'), date('Y-m-d H:i:s') . "请求:". $req . PHP_EOL, FILE_APPEND);
|
|
|
//转发接口
|
|
|
$transmitUrl = env("TRANSMIT_URL");
|
|
|
return $this->httpPost($transmitUrl,json_encode($req));
|
|
|
$resp = $this->httpPost($transmitUrl,json_encode($req));
|
|
|
@file_put_contents(storage_path('logs/notify_send.log'), date('Y-m-d H:i:s') . "响应:". $resp . PHP_EOL, FILE_APPEND);
|
|
|
return $resp;
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -531,7 +534,7 @@ public function inquiry(Request $request) |
|
|
}
|
|
|
|
|
|
$data["files"] = $request->allFiles();
|
|
|
return $this->transmit($request,self::TYPEINQUIRY,self::TRAFFICZERO,$data["files"]);
|
|
|
return $this->transmit($request,self::TYPEINQUIRY,self::TRAFFICZERO);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|