protected function addGeneratedNonce(array $config): array
    {
        if (($config['csp']['script-src']['add-generated-nonce'] ?? false) === true) {
            $config['csp']['script-src']['nonces'][] = self::nonce();
        }

        if (($config['csp']['style-src']['add-generated-nonce'] ?? false) === true) {
            $config['csp']['style-src']['nonces'][] = self::nonce();
        }

        return $config;
    }