Mixed Content: The page at 'xxx' was loaded over HTTPS, but requested an insecure resource 'xxx'.


HTTPS頁面里動態的引入HTTP資源,比如引入一個js文件,會被直接block掉的.在HTTPS頁面里通過AJAX的方式請求HTTP資源,也會被直接block掉的。

Mixed Content: The page at 'xxx' was loaded over HTTPS, but requested an insecure resource 'xxx'. This request has been blocked; the content must be served over HTTPS.

解決辦法:

頁面的head中加入:

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

意思是自動將http的不安全請求升級為https


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM