Browse files

Block link prefetching from Mozilla and Google Web Accelerator.

  • Loading branch information...
1 parent 085c7c4 commit 9132b70313808d464feb00b5184e2d513f57fc06 martinlanghoff committed May 7, 2005
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/setup.php
View
7 lib/setup.php
@@ -17,6 +17,13 @@
/// If there are any errors in the standard libraries we want to know!
error_reporting(E_ALL);
+/// Just say no to link prefetching (Moz prefetching, Google Web Accelerator, others)
+ if (!empty($_SERVER['HTTP_X_moz']) && $_SERVER['HTTP_X_moz'] === 'prefetch'){
+ header($_SERVER['SERVER_PROTOCOL'] . ' 403 Prefetch Forbidden');
+ trigger_error('Prefetch request forbidden.');
+ exit;
+ }
+
/// Connect to the database using adodb
$CFG->libdir = "$CFG->dirroot/lib";

0 comments on commit 9132b70

Please sign in to comment.