Nexcessnet_Turpentine_Model_Varnish_Configurator_Abstract::_vcl_sub_synth PHP Method

_vcl_sub_synth() protected method

Get the allowed IPs when in maintenance mode
protected _vcl_sub_synth ( ) : string
return string
    protected function _vcl_sub_synth()
    {
        if (!$this->_getDebugIps() || !Mage::getStoreConfig('turpentine_vcl/maintenance/custom_vcl_synth')) {
            return false;
        }
        switch (Mage::getStoreConfig('turpentine_varnish/servers/version')) {
            case 4.0:
                $tpl = <<<EOS
sub vcl_synth {
    if (resp.status == 999) {
        set resp.status = 404;
        set resp.http.Content-Type = "text/html; charset=utf-8";
        synthetic({"{{vcl_synth_content}}"});
        return (deliver);
    }
    return (deliver);
}

EOS;
                break;
            default:
                $tpl = <<<EOS
sub vcl_error {
    set obj.http.Content-Type = "text/html; charset=utf-8";
    synthetic {"{{vcl_synth_content}}"};
    return (deliver);
}
EOS;
        }
        return $this->_formatTemplate($tpl, array('vcl_synth_content' => Mage::getStoreConfig('turpentine_vcl/maintenance/custom_vcl_synth')));
    }