https 中的 Magento 2 自定义客户导航
Magento 2 Custom customer navigation in https
在我的 magento 2 站点中,我在客户仪表板中创建了一个新的自定义导航。我已经为安全网址启用了 https。我账户导航里的link都是https,但是我自定义的link是http。我怎样才能让它成为 https?
找到解决方案 在模块 etc/frontend/di.xml 添加以下代码
<type name="Magento\Framework\Url\SecurityInfo">
<arguments>
<argument name="secureUrlList" xsi:type="array">
<item name="subscription" xsi:type="string">/subscription/</item>
</argument>
</arguments>
</type>
如果 url 有 /subscription/ 那么它将被视为 https
在我的 magento 2 站点中,我在客户仪表板中创建了一个新的自定义导航。我已经为安全网址启用了 https。我账户导航里的link都是https,但是我自定义的link是http。我怎样才能让它成为 https?
找到解决方案 在模块 etc/frontend/di.xml 添加以下代码
<type name="Magento\Framework\Url\SecurityInfo">
<arguments>
<argument name="secureUrlList" xsi:type="array">
<item name="subscription" xsi:type="string">/subscription/</item>
</argument>
</arguments>
</type>
如果 url 有 /subscription/ 那么它将被视为 https