[index.php] Change user agent to constant and include current version

This commit is contained in:
logmanoriginal 2018-11-05 18:51:57 +01:00
parent 0f8443e1d3
commit 1a00dfa412
1 changed files with 9 additions and 6 deletions

View File

@ -54,13 +54,16 @@ if (isset($argv)) {
$params = $_GET;
}
// FIXME : beta test UA spoofing, please report any blacklisting by PHP-fopen-unfriendly websites
define('REPOSITORY', 'https://github.com/RSS-Bridge/rss-bridge/');
define('USER_AGENT',
'Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20121202 Firefox/30.0(rss-bridge/'
. Configuration::$VERSION
. ';+'
. REPOSITORY
. ')'
);
$userAgent = 'Mozilla/5.0(X11; Linux x86_64; rv:30.0)';
$userAgent .= ' Gecko/20121202 Firefox/30.0(rss-bridge/0.1;';
$userAgent .= '+https://github.com/RSS-Bridge/rss-bridge)';
ini_set('user_agent', $userAgent);
ini_set('user_agent', USER_AGENT);
// default whitelist
$whitelist_default = array(