Hay una función solo para eso, llamada shouldUrlBeSecure
ubicada en app/code/core/Mage/Core/Model/Config.php
línea 1477
.
Aquí está la función completa:
/**
* Check whether given path should be secure according to configuration security requirements for URL
* "Secure" should not be confused with https protocol, it is about web/secure/*_url settings usage only
*
* @param string $url
* @return bool
*/
public function shouldUrlBeSecure($url)
{
if (!Mage::getStoreConfigFlag(Mage_Core_Model_Store::XML_PATH_SECURE_IN_FRONTEND)) {
return false;
}
if (!isset($this->_secureUrlCache[$url])) {
$this->_secureUrlCache[$url] = false;
$secureUrls = $this->getNode('frontend/secure_url');
foreach ($secureUrls->children() as $match) {
if (strpos($url, (string)$match) === 0) {
$this->_secureUrlCache[$url] = true;
break;
}
}
}
return $this->_secureUrlCache[$url];
}
Para ver qué URL deben ser seguras, puede agregar un simple Mage::log($secureUrls)
dentro de la if
declaración. Así es como se veía mi entrada de registro:
2014-02-12T11:55:26+00:00 DEBUG (7): Mage_Core_Model_Config_Element Object
(
[install] => /install/wizard/checkSecureHost
[customer] => /customer/
[sales] => /sales/
[authorizenet_paygate] => /paygate/authorizenet_payment
[checkout_onepage] => /checkout/onepage
[checkout_multishipping] => /checkout/multishipping
[paypal_express] => /paypal/express
[paypal_standard] => /paypal/standard
[paypal_express_callbackshippingoptions] => paypal/express/callbackshippingoptions
[googlecheckout_redirect] => /googlecheckout/redirect/
[googlecheckout_beacon] => /googlecheckout/api/beacon/
[googlecheckout_api] => /googlecheckout/api/
[review_customer] => /review/customer/
[tag_customer] => /tag/customer/
[wishlist] => /wishlist/
[paypaluk_express] => /paypaluk/express
[rss_catalog_review] => /rss/catalog/review
[rss_order_new] => /rss/order/new
[rss_catalog_notifystock] => /rss/catalog/notifystock
[centinel] => /centinel/
[newsletter_manage] => /newsletter/manage/
[downloadable] => /downloadable/customer/
[downloadable_download] => /downloadable/download/
[ogone_api] => /ogone/api
[persistent_onepage_register] => /persistent/index/saveMethod
[checkout_cart] => /checkout/cart
[storecredit_info] => /storecredit/info/
[giftcard_customer] => /giftcard/customer/
[enterprise_pbridge_pbridge] => /enterprise_pbridge/pbridge/
[invitation] => /invitation/
)
Ahora que encontrar la manera de Magento cambia HTTP
a HTTPS
creo que lo más probable es que tenga sumergirse en el marco de Zend en el lib
interior lib/Zend/Http/*
, ya que contiene los archivos de mayor interés. Bueno, de todos modos espero que esto haya ayudado. ¡Buena suerte!