Nexcessnet_Turpentine_Model_Varnish_Configurator_Abstract::_getNormalizeHostTarget PHP Method

_getNormalizeHostTarget() protected method

Get the hostname for host normalization from Magento's base URL
protected _getNormalizeHostTarget ( ) : string
return string
    protected function _getNormalizeHostTarget()
    {
        $configHost = trim(Mage::getStoreConfig('turpentine_vcl/normalization/host_target'));
        if ($configHost) {
            return $configHost;
        } else {
            $baseUrl = parse_url(Mage::getBaseUrl());
            if (isset($baseUrl['port'])) {
                return sprintf('%s:%d', $baseUrl['host'], $baseUrl['port']);
            } else {
                return $baseUrl['host'];
            }
        }
    }