错误:Mixed Content: The page at ‘https://XXX’ was loaded over HTTPS, but requested an insecure.......
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
注意:在需要的网页上加上面的语句,
其它不需要的网页不需要加,不然后了出错的。
CSP设置upgrade-insecure-requests
好在 W3C 工作组考虑到了我们升级 HTTPS 的艰难,在 2015 年 4 月份就出了一个 Upgrade Insecure Requests
的草案,他的作用就是让浏览器自动升级请求。
在我们服务器的响应头中加入:
header("Content-Security-Policy: upgrade-insecure-requests");
转载:https://blog.csdn.net/u012259256/article/details/72039950
https://www.cnblogs.com/hustskyking/p/upgrade-insecure-requests.html
https://blog.csdn.net/haibo0668/article/details/82947917
错误:Mixed Content: The page at ‘https://XXX’ was loaded over HTTPS, but requested an insecure.......相关推荐
- JS错误:Mixed Content: The page at ‘https://XXX’ was loaded over HTTPS, but requested an insecure 新的问题
文章目录 JS错误:Mixed Content: The page at 'https://XXX' was loaded over HTTPS, but requested an insecure ...
- 解决Mixed Content: The page at https://xxx was loaded over HTTPS
背景:现有一个项目,网站访问地址示例为 https://www.testcase.com,其中某个功能需要用到外部的服务(例如http:42.192.36.246/api/api.js),并且这个服务 ...
- 错误:Mixed Content: The page at ‘https://XXX’ was loaded over HTTPS, but requested an in...
在使用Tomcat+Nginx时.Nginx使用https,Tomcat使用http.使用iframe之类框架,在重定向时会出现以上问题导致页面加载不出来.这是因为Tomcat不知道Nginx发来的是 ...
- Mixed Content: The page at“https://xxx”was loaded over HTTPS, but requested an insecure
一,现象 接口请求通,查看network 二,原因 https的服务不可以请求http的接口,如果必须要使用,那么就需要在自己的服务器上做反向代理.
- vue项目高德地图Mixed Content: The page at ‘https://****.com/cockpit/‘ was loaded over HTTPS, b
vue项目高德地图引入https相关报错 vue项目中高德地图引入相关问题 原因和解决方案 vue项目中高德地图引入相关问题 公司年前一个vue项目一期,其中有个数据可视化模块引入了高德地图,年前发布 ...
- http请求https报错:Mixed Content: The page at ‘xxx‘ was loaded over HTTPS, but requested an insecure...
当我们的浏览器出现类似"was loaded over HTTPS, but requested an insecure resource/frame"这种错误是,一般都是因为我们 ...
- html页面和手机比例一致 一比一自适应 Mixed Content: The page at ‘xxx‘ was loaded over HTTPS, but requested an insec
1. HTML页面与手机端一比一适应 这行代码是一比一自适应,目的是让手机端看见的网页和在电脑上看见的相同,不写这一行会导致手机上的网页特别小. 原因是电脑显示的是px和手机上像素单位不一致,在< ...
- 错误:Mixed Content: The page at 'https://a.b.com/detail?id=5' was loaded over HTTPS, but reque
关于这个错误的详细内容为: Mixed Content: The page at 'https://a.b.com/detail?id=5' was loaded over HTTPS, but re ...
- 修复报错Mixed Content: The page at “https://“ was loaded over HTTPS, but requested an insecure “http://“
当浏览器出现"was loaded over HTTPS, but requested an insecure resource/frame"这种错误是,一般都是因为网站是HTTP ...
- 解决Mixed Content: The page at https://* was loaded over HTTPS, but requested an insecure XMLHttpReque
目录 项目场景 问题描述 原因分析 解决方案 一些问题 项目场景 https协议的网站下请求http的资源 问题描述 https协议的网站请求http协议的资源被浏览器任务不安全,请求被拦截并且报了以 ...
最新文章
- 巨人网络开发工程师试题
- 06 - java 方法
- Android-Socket的最基础实现以及遇见在2.3可用4.3不可用的解决方法
- 前端开发 填充padding 0229
- 平均年薪 70 万!刚刚,这类程序员又涨薪了!佩服!
- java网站开发模式有哪些_第7章JavaWeb常用开发模式.ppt
- TPC,TPCC,TPMC(数据库性能衡量指标)
- error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“
- VMware安装CentOS 7.0 Fail to start media check on /dev/sr0
- 互联网人职业发展之路:三年升高工,七年做架构,十年送外卖
- 关于 Sensor flicker/banding现象的解释
- Sen2cor提示:Product metadata file cannot be read报错
- SaaS最通俗易懂的解释是什么?看这篇就够了
- Windows 11系统IDEA启动时报错:Cannot find keymap “Windows copy” 解决办法
- 黑帽SEO的常见操作手法解析
- java图形界面编程如何给窗口设置背景图片
- 深入浅出地讲解麦克斯韦方程组
- 130页5万字某市档案馆数字档案馆建设方案
- LINK : fatal error LNK1168: cannot open Debug/Test.exe for writing的解决方法
- python画指数函数图像_Python3.0科学计算学习之绘图(一