作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !1951
@@ -147,11 +147,10 @@ class PostInquiryForward extends Command @@ -147,11 +147,10 @@ class PostInquiryForward extends Command
147 'ip' => $detail['ip'], 147 'ip' => $detail['ip'],
148 'url' => $log['url'], 148 'url' => $log['url'],
149 'device_port' => $detail['device_port'], 149 'device_port' => $detail['device_port'],
150 - 'referrer_url' => $detail['referrer'],  
151 - 'user_agent' => $detail['user_agent'], 150 + 'referrer_url' => $detail['referrer']
152 ]; 151 ];
153 $url = $website . 'api/traffic_visit/'; 152 $url = $website . 'api/traffic_visit/';
154 - $res = Http::withoutVerifying()->timeout(30)->post($url, $data)->json(); 153 + $res = Http::withoutVerifying()->timeout(30)->withHeaders(['User-Agent' => $detail['user_agent']])->post($url, $data)->json();
155 if (empty($res['status']) || $res['status'] != 200) { 154 if (empty($res['status']) || $res['status'] != 200) {
156 $log->status = InquiryRelayDetailLog::STATUS_FAIL; 155 $log->status = InquiryRelayDetailLog::STATUS_FAIL;
157 $log->remark = mb_substr($res['message'] ?? '', 0, 200); 156 $log->remark = mb_substr($res['message'] ?? '', 0, 200);