Magento 2: Check if Current URL & Frontend URL are Secure (https)
This article shows how we can check if current URL and frontend URl are secure (https) or not in Magento 2. Below is a block class of my custom module (Chapagain_HelloWorld). I have injected object of StoreManagerInterface in the constructor of my module’s block class. app/code/Chapagain/HelloWorld/Block/HelloWorld.php <?php namespace Chapagain\HelloWorld\Block; class HelloWorld extends \Magento\Framework\View\Element\Template { protected … Read more