diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-06-19 06:52:26 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-06-19 06:52:26 +0400 |
commit | 9512794a352c84dcc5dd11d69d2e5ceb23e75dc9 (patch) | |
tree | b22ea67987bf155efcada28c659eca04bb474961 /js/index.php | |
parent | f169ee42e8bc15ffa63b5589d16280aa10e88ee1 (diff) |
Move tracker proxy logic in js/index.php to js/tracker.php & allow the removal of the comment header in piwik.js (includes test). Also remove @group from static file serve test & fix bug in modified _readfile() proxy.
Diffstat (limited to 'js/index.php')
-rw-r--r-- | js/index.php | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/js/index.php b/js/index.php index 4eece69c7b..b51408b428 100644 --- a/js/index.php +++ b/js/index.php @@ -5,33 +5,6 @@ * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -use Piwik\ProxyHttp; +define("PIWIK_KEEP_JS_TRACKER_COMMENT", 1); -/** - * Tracker proxy - */ -if($_SERVER['REQUEST_METHOD'] == 'POST' || !empty($_SERVER['QUERY_STRING'])) { - include '../piwik.php'; - exit; -} - -/** - * piwik.js proxy - * - * @see core/Piwik.php - */ -define('PIWIK_INCLUDE_PATH', '..'); -define('PIWIK_DOCUMENT_ROOT', '..'); -define('PIWIK_USER_PATH', '..'); - -require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php'; -require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; - -$file = '../piwik.js'; - - -$daysExpireFarFuture = 10; - -ProxyHttp::serverStaticFile($file, "application/javascript; charset=UTF-8", $daysExpireFarFuture); - -exit; +require_once __DIR__ . '/tracker.php';
\ No newline at end of file |