Prestashop上带有smartblog-v3.0.0模块的混合内容

问题描述 投票:0回答:1

我在使用Prestashop 1.7创建的网站上安装了SSL证书。但它向我表明,由于HTTP请求对smartblog v 3.0.0的映像提出请求,因此这并不完全安全。从Firefox开发人员工具检查代码。以前,我试图强制模块仅通过https读取照片。代码编辑未产生结果。从收集到的信息来看,博客模块似乎无法通过https加载照片。因此,重复内容。

Link to the website

Screenshot dev tools

smartblog.php文件的一部分:

public static function GetSmartBlogUrl()
{
    $ssl_enable = Configuration::get('PS_SSL_ENABLED');
    $id_lang = (int) Context::getContext()->language->id;
    $id_shop = (int) Context::getContext()->shop->id;
    $rewrite_set = (int) Configuration::get('PS_REWRITING_SETTINGS');
    $ssl = null;
    static $force_ssl = null;
    if ($ssl === null) {
        if ($force_ssl === null)
            $force_ssl = (Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE'));
        $ssl = $force_ssl;
    }

    if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && $id_shop !== null)
        $shop = new Shop($id_shop);
    else
        $shop = Context::getContext()->shop;
    $base = ($ssl == 1 && $ssl_enable == 1) ? 'https://' . $shop->domain_ssl : 'http://' . $shop->domain;
    $langUrl = Language::getIsoById($id_lang) . '/';
    if ((!$rewrite_set && in_array($id_shop, array((int) Context::getContext()->shop->id, null))) || !Language::isMultiLanguageActivated($id_shop) || !(int) Configuration::get('PS_REWRITING_SETTINGS', null, null, $id_shop))
        $langUrl = '';

    return $base . $shop->getBaseURI() . $langUrl;
}

public static function GetSmartBlogLink($rewrite = 'smartblog', $params = null, $id_shop = null, $id_lang = null)
{
    $url = smartblog::GetSmartBlogUrl();
    $dispatcher = Dispatcher::getInstance();
    $id_lang = (int) Context::getContext()->language->id;
    $force_routes = (bool) Configuration::get('PS_REWRITING_SETTINGS');
    if ($params != null) {
        return $url . $dispatcher->createUrl($rewrite, $id_lang, $params, $force_routes);
    } else {
        $params = array();
        return $url . $dispatcher->createUrl($rewrite, $id_lang, $params, $force_routes);
    }
}
ssl prestashop prestashop-1.7
1个回答
0
投票

我在加载激活了ssl的帖子图像时遇到了同样的问题。只需将http://行中的代码替换为https://即可。清除缓存并工作。

© www.soinside.com 2019 - 2024. All rights reserved.