private function reformatLocationHeader(ResponseInterface $response) { $location = $response->getHeader('Location'); if ($location && !preg_match('/^http[s]?:\\/\\//', $location)) { $response->setHeader('Location', $this->config->getConfig('site_protocol') . '://' . $this->config->getConfig('site_domain') . $location); } }
function filterResponse(ResponseInterface $response) { $printer = $this->getPrinter($this->getOutputType($response->getHeader('Content-Type'))); $this->addDebugExecutionTime(); $this->addDebugMemoryUsage(); $response->setContent($printer->printDebug($this->debug, $response->getContent())); return $response; }