/** * 2016-05-30 * 2016-05-31 * https://mage2.pro/tags/secure-url * @see \Magento\Framework\Url::getBaseUrl() * https://github.com/magento/magento2/blob/a5fa3af3/lib/internal/Magento/Framework/Url.php#L437-L439 if (isset($params['_secure'])) { $this->getRouteParamsResolver()->setSecure($params['_secure']); } * @return string */ protected function url() { return dfc($this, function () { return df_my_local() ? $this->urlForMyLocalPc() : $this->urlForOthers(); }); }
/** @return string */ function df_visitor_ip() { /** @var \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress $a */ $a = df_o(\Magento\Framework\HTTP\PhpEnvironment\RemoteAddress::class); return df_my_local() ? '92.243.166.8' : $a->getRemoteAddress(); }
/** * 2016-07-12 * @param string $routePath * @param bool $requireHTTPS [optional] * @return string */ function df_url_callback($routePath, $requireHTTPS = false) { /** @var string $result */ $result = df_my_local() ? df_cc_path_t('https://mage2.pro/sandbox', $routePath) : df_url_frontend($routePath, ['_secure' => $requireHTTPS ? true : null]); if ($requireHTTPS && !df_my_local()) { df_assert_https($result); } return $result; }