private function calculateFrameOptions()
    {
        $retval = null;

        $nb_site = $this->nb_request->getSite();

        switch ($nb_site->getXFrameOptions()) {
            case 'D':
                $retval = 'DENY';
                break;
            case 'S':
                $retval = 'SAMEORIGIN';
                break;
            case 'A':
                if (is_string($url = $nb_site->getXFrameOptionsURL()) &&
                    strlen($url = preg_replace(array('/^\s*/', '/\s*$/'), '', $url)) > 0) {
                    $retval = 'ALLOW-FROM ' . $url;
                } else {
                    throw new ENabuHTTPException(ENabuHTTPException::ERROR_X_FRAME_OPTIONS_URL_NOT_FOUND);
                }
        }

        return $retval;
    }