remoteAddress = $request->getRemoteAddress(); } protected function content(array $request = []): string { throw new HTTPException\NotFoundException($this->t('Page not found.')); } public function run(ModuleHTTPException $httpException, array $request = []): ResponseInterface { // The URL provided does not resolve to a valid module. $queryString = $this->server['QUERY_STRING']; // Stupid browser tried to pre-fetch our JavaScript img template. Don't log the event or return anything - just quietly exit. if (!empty($queryString) && preg_match('/{[0-9]}/', $queryString) !== 0) { System::exit(); } $this->logger->debug('index.php: page not found.', [ 'request_uri' => $this->server['REQUEST_URI'], 'address' => $this->remoteAddress, 'query' => $this->server['QUERY_STRING'] ]); return parent::run($httpException, $request); } }