/** * Add response headers with debug data and statistics * * @param WebResponse $response * @author macbre */ private static function addExtraHeaders(WebResponse $response) { global $wgRequestTime; $elapsed = microtime(true) - $wgRequestTime; $response->header(sprintf('X-Served-By:%s', wfHostname())); $response->header(sprintf('X-Backend-Response-Time:%01.3f', $elapsed)); $response->header('X-Cache: ORIGIN'); $response->header('X-Cache-Hits: ORIGIN'); }