24 $this->scopeConfig = $scopeConfig;
37 $isValidSchema = !isset($uri[
'scheme']) || $uri[
'scheme'] ===
$request->getScheme();
38 $isValidHost = !isset($uri[
'host']) || $uri[
'host'] ===
$request->getHttpHost();
39 $isValidPath = !isset($uri[
'path']) || strpos($requestUri, $uri[
'path']) !==
false;
40 return $isValidSchema && $isValidHost && $isValidPath;
50 return (
bool) $this->scopeConfig->getValue(
51 'web/url/redirect_to_base',
63 $baseUrl = $this->scopeConfig->getValue(
64 'web/unsecure/base_url',
67 $baseUrlParts = explode(
'://', $baseUrl);
68 $baseUrlProtocol = array_shift($baseUrlParts);
69 $isSecure = (bool) $this->scopeConfig->getValue(
70 'web/secure/use_in_frontend',
74 return $isSecure && $baseUrlProtocol ==
'https';
__construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig)