aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/feed.php6
-rw-r--r--phpBB/includes/functions.php6
2 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/feed.php b/phpBB/feed.php
index aacbb48591..bc23a19f42 100644
--- a/phpBB/feed.php
+++ b/phpBB/feed.php
@@ -173,6 +173,12 @@ if (defined('DEBUG_EXTRA') && request_var('explain', 0) && $auth->acl_get('a_'))
header("Content-Type: application/atom+xml; charset=UTF-8");
header("Last-Modified: " . gmdate('D, d M Y H:i:s', $feed_updated_time) . ' GMT');
+if (!empty($user->data['is_bot']))
+{
+ // Let reverse proxies know we detected a bot.
+ header('X-PHPBB-IS-BOT: yes');
+}
+
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
echo '<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="' . $global_vars['FEED_LANG'] . '">' . "\n";
echo '<link rel="self" type="application/atom+xml" href="' . $global_vars['SELF_LINK'] . '" />' . "\n\n";
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index a118af0396..47ff270b76 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4584,6 +4584,12 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
header('Expires: 0');
header('Pragma: no-cache');
+ if (!empty($user->data['is_bot']))
+ {
+ // Let reverse proxies know we detected a bot.
+ header('X-PHPBB-IS-BOT: yes');
+ }
+
return;
}