processData->getBasePath(), $this->processData->getRouteParams() ); $this->beforeProceed(); $responseWrapped = $this->controllerActionProcessor->process( $this->controllerName, $this->actionName, $requestWrapped, $this->responseWrapped ); $this->afterProceed($responseWrapped); return $responseWrapped->toPsr7(); } private function beforeProceed(): void { $this->responseWrapped->setHeader('Content-Type', 'application/json'); } private function afterProceed(Response $responseWrapped): void { $responseWrapped ->setHeader('X-App-Timestamp', (string) ($this->config->get('appTimestamp') ?? '0')) ->setHeader('Expires', '0') ->setHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT') ->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0') ->setHeader('Pragma', 'no-cache'); } }