nonce === '') { if (empty($this->request->server['CSP_NONCE'])) { $this->nonce = base64_encode($this->csrfTokenManager->getToken()->getEncryptedValue()); } else { $this->nonce = $this->request->server['CSP_NONCE']; } } return $this->nonce; } /** * Check if the browser supports CSP v3 */ public function browserSupportsCspV3(): bool { $browserBlocklist = [ Request::USER_AGENT_IE, ]; if ($this->request->isUserAgent($browserBlocklist)) { return false; } return true; } }