From 7293e44f581c627a9488f89311c86e0c81347046 Mon Sep 17 00:00:00 2001 From: Renan Bernordi Date: Thu, 28 Nov 2024 15:57:34 -0300 Subject: [PATCH] =?UTF-8?q?corrigida=20a=20implementa=C3=A7=C3=A3o=20de=20?= =?UTF-8?q?useragent=20customizado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/inc/URLAnalyzer.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/inc/URLAnalyzer.php b/app/inc/URLAnalyzer.php index f8c091b..bb5db35 100644 --- a/app/inc/URLAnalyzer.php +++ b/app/inc/URLAnalyzer.php @@ -207,6 +207,11 @@ class URLAnalyzer } } + // Adiciona headers específicos do domínio se existirem + if ($domainRules !== null && isset($domainRules['userAgent'])) { + $curlOptions[CURLOPT_USERAGENT] = $domainRules['userAgent']; + } + // Adiciona headers específicos do domínio se existirem if ($domainRules !== null && isset($domainRules['customHeaders'])) { foreach ($domainRules['customHeaders'] as $headerName => $headerValue) {