Nexcessnet_Turpentine_Model_Varnish_Configurator_Abstract::_vcl_sub_synth_https_fix PHP Method

_vcl_sub_synth_https_fix() protected method

vcl_synth for fixing https
protected _vcl_sub_synth_https_fix ( ) : string
return string
    protected function _vcl_sub_synth_https_fix()
    {
        $tpl = $this->_vcl_sub_synth();
        if (!$tpl) {
            $tpl = <<<EOS
sub vcl_synth {
    if (resp.status == 750) {
        set resp.status = 301;
        set resp.http.Location = "https://" + req.http.host + req.url;
        return(deliver);
    }
}
EOS;
        } else {
            $tpl_750 = '
sub vcl_synth {
    if (resp.status == 750) {
        set resp.status = 301;
        set resp.http.Location = "https://" + req.http.host + req.url;
        return(deliver);
    }';
            $tpl = str_ireplace('sub vcl_synth {', $tpl_750, $tpl);
        }
        return $tpl;
    }