中文字幕在线观看,亚洲а∨天堂久久精品9966,亚洲成a人片在线观看你懂的,亚洲av成人片无码网站,亚洲国产精品无码久久久五月天

部署https后瀏覽器提示不安全,不出現(xiàn)綠色小鎖?

網(wǎng)站部署https后,瀏覽器提示不安全, 不出現(xiàn)綠色小鎖圖標(biāo)?

訪問網(wǎng)站后,按f12,瀏覽器提示:

Mixed Content: The page at 'https://www.xxx.com/'' was loaded over HTTPS, but requested an insecure image 'http://www.xxx.com/uploads/2018/12/3.png'. This content

原因是在https頁面中,如果調(diào)用了http資源,那么瀏覽器就會(huì)拋出一些錯(cuò)誤,

解決辦法:在header中加入 Upgrade-Insecure-Requests,會(huì)告訴瀏覽器可以把所屬本站的所有 http 連接升級(jí)為 https 連接,外站請(qǐng)求保持默認(rèn);

添加header方法:

1.iis7

        image.png

        

        或直接在網(wǎng)站根目錄web.config中定義

 <?xml version="1.0" encoding="UTF-8"?>   
      <configuration>
         <system.webServer>
           <httpProtocol>
           <customHeaders>
            <add name="Content-Security-Policy" value="upgrade-insecure-requests" />
           </customHeaders>
         </httpProtocol>
        </system.webServer> 
        </configuration>

2.apache

    可直接在網(wǎng)站根目錄.htaccess中定義

 <IFModule mod_headers.c>     
     Header add Content-Security-Policy upgrade-insecure-requests
 </IFModule>

3. nginx

        server {
            listen        80;
            server_name   (myservername);
            add_header Content-Security-Policy "upgrade-insecure-requests";
            location / {    
                proxy_pass         http://localhost:5000;
            }
        }

        


編輯:西部數(shù)碼
日期:2020-06-19

收藏 】 【 打印 】   
您可對(duì)文檔進(jìn)行評(píng)分喲~

勾選遇到的問題提交給我們,收到反饋后保證及時(shí)修正更新!

提交反饋需要先登陸會(huì)員帳號(hào)

上一篇:彈性云主機(jī)云鏡像使用說明(含云鏡像市場(chǎng))
下一篇:部署https后訪問提存在安全隱患NET::ERR_SSL_OBSOLETE_VERSION
若文檔內(nèi)容對(duì)您沒有幫助,不能解決問題? 您還可以 咨詢?cè)诰客服提交工單搜索常見問題 ,我們將竭誠為您服務(wù)。
  >> 相關(guān)文章
 
分享至:
Top

24小時(shí)客服熱線

400-028-5800

028-62778877

您好,非正常上班時(shí)間若有緊急技術(shù)問題,請(qǐng)撥總機(jī)后按7號(hào)鍵, 其他問題請(qǐng)?zhí)峤还位蛟谏习鄷r(shí)間聯(lián)系,謝謝支持!