From 1a00dfa412afbafe8246a94dc53be5b519298855 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Mon, 5 Nov 2018 18:51:57 +0100 Subject: [PATCH] [index.php] Change user agent to constant and include current version --- index.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index e658b040..bf5c234c 100644 --- a/index.php +++ b/index.php @@ -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(