• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/rest/smile.php
  • Класс: BitrixMainRestSmile
  • Вызов: Smile::getServerAddress
static function getServerAddress()
{
	$publicUrl = BitrixMainConfigOption::get('main', 'last_site_url', '');

	if ($publicUrl)
	{
		return $publicUrl;
	}
	else
	{
		return (BitrixMainContext::getCurrent()->getRequest()->isHttps() ? "https" : "http")."://".$_SERVER['SERVER_NAME'].(in_array($_SERVER['SERVER_PORT'], Array(80, 443))?'':':'.$_SERVER['SERVER_PORT']);
	}
}