summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2025-10-15 14:35:16 +0200
committerUrban Müller2025-10-15 14:35:16 +0200
commit586c433bbb5a6a2f7f41a1176d9ef9366b836d3c (patch)
treeaecf55a21a460d1e0ba018ae8c4db7de4069d1cb
parent26185bb4f1824d3cc96824d94f35cb241d344028 (diff)
downloaditools-586c433bbb5a6a2f7f41a1176d9ef9366b836d3c.tar.gz
itools-586c433bbb5a6a2f7f41a1176d9ef9366b836d3c.tar.bz2
itools-586c433bbb5a6a2f7f41a1176d9ef9366b836d3c.zip
update user agent so outdooractive no longer refuses to send json...
-rw-r--r--it_url.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class
index 6d1d7ce..dadb1d5 100644
--- a/it_url.class
+++ b/it_url.class
@@ -195,7 +195,7 @@ static function _default_headers($url, $p)
$headers = array_filter([
'Host' => $url->realhostname . $url->explicitport,
- 'User-Agent' => "Mozilla/5.0 (compatible; ITools; Chrome/70.0.3538.102 Safari/537.36 Edge/18.19582)",
+ 'User-Agent' => "Mozilla/5.0 (compatible; ITools; Chrome/141.0.0.0 Safari/604.1)",
'Accept-Language' => $p['headers']['Accept-Language'] ?? ($search_subrequest ? T_defaultlang() : T_lang()), # can prevent loading of it_text
'Referer' => it::match('([-\w]+\.\w+)$', $url->hostname) == it::match('([-\w]+\.\w+)$', $_SERVER['HTTP_HOST']) ? it::replace(['%[0-9a-f]?$' => ''], substr(static::absolute(U($_GET)), 0, 8000)) : null, # Truncate overly long referers leading to failed subrequest but make sure it is still propery urlencoded
'X-Ultra-Https' => $_SERVER['HTTPS'],