最近用WordPress加一为导航主题搭建了一个导航站,考虑到不暴露源站IP然后套了个腾讯云的cdn。
但是今天访问网站整个网站样式全部错乱,打开控制台查看提示:
Nixed Content: The page at URL was loaded over HTTPS, but requested an insecure script 'CURL. This request has been blocked; the content must be served over HTTPS.
这个问题之前也遇到过,然后很轻而易举的就解决啦。
打开WordPress主题目录,找到header.php文件,一般路径是:网站根目录/wp-content/themes/主题主目录
在header.php文件的head标签添加下面的meta标签保存即可
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
打开网站,一切正常~如果还是报错,打开Chrome的无痕模式访问,如果还是这样,在腾讯云cdn控制台,刷新缓存,输入你的网址,例如:https://www.123.cn/*
原文链接:https://blog.csdn.net/m0_47207594/article/details/122263608?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165934461816780357282901%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165934461816780357282901&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-27-122263608-null-null.nonecase&utm_term=%E6%90%AD%E5%BB%BAcdn
原创文章,作者:优速盾-小U,如若转载,请注明出处:https://www.cdnb.net/bbs/archives/7778