解决Mixed Content:the page at‘https://’ was loaded over HTTPS,but requested an insecure resource ‘http://’

问题:在Vue项目中使用axios访问了一个http协议的接口,报错如下

查资料后发现原因是在https中请求http接口或引入http资源都会被直接blocked(阻止),浏览器默认此行为不安全,会拦截。

解决办法:

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

在页面中加上此meta标签,原理是使用META标签强制将http请求转成https(SSL协议)请求。

参考
https://www.cnblogs.com/527xyz/p/14870576.html

解决Mixed Content:the page at‘https://‘ was loaded over HTTPS,but requested an insecure resource ‘http相关推荐

  1. html页面和手机比例一致 一比一自适应 Mixed Content: The page at ‘xxx‘ was loaded over HTTPS, but requested an insec

    1. HTML页面与手机端一比一适应 这行代码是一比一自适应,目的是让手机端看见的网页和在电脑上看见的相同,不写这一行会导致手机上的网页特别小. 原因是电脑显示的是px和手机上像素单位不一致,在< ...

  2. 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"这种错误是,一般都是因为我们 ...

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

    今天使用nginx+tomcat+ssl完成了web项目的部署,本以为没有什么问题,但是在页面测试的时候又蹦出了这么一个问题,大致是说由于配置了HTTPS,但是之前的请求是通过HTTP请求的,所以现在 ...

  4. 解决Mixed Content: The page at https://xxx was loaded over HTTPS

    背景:现有一个项目,网站访问地址示例为 https://www.testcase.com,其中某个功能需要用到外部的服务(例如http:42.192.36.246/api/api.js),并且这个服务 ...

  5. 解决Mixed Content: The page at https://* was loaded over HTTPS, but requested an insecure XMLHttpReque

    目录 项目场景 问题描述 原因分析 解决方案 一些问题 项目场景 https协议的网站下请求http的资源 问题描述 https协议的网站请求http协议的资源被浏览器任务不安全,请求被拦截并且报了以 ...

  6. Mixed Content: The page at 'https://m.ctrip.com/webapp/dingzhi/v3_index' was loa

    部门在https 改造中遇到的这个问题, Mixed Content: The page at 'https://m.ctrip.com/webapp/dingzhi/v3_index' was lo ...

  7. Nginx报错Mixed Content: The page was loaded over HTTPS, This content should also be served over https

    报错信息如下: Mixed Content: The page at 'https://www.example.com' was loaded over HTTPS, but requested an ...

  8. vue项目高德地图Mixed Content: The page at ‘https://****.com/cockpit/‘ was loaded over HTTPS, b

    vue项目高德地图引入https相关报错 vue项目中高德地图引入相关问题 原因和解决方案 vue项目中高德地图引入相关问题 公司年前一个vue项目一期,其中有个数据可视化模块引入了高德地图,年前发布 ...

  9. 错误: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 ...

最新文章

  1. 我竟然混进了Python高级圈子!
  2. 空间谱专题09:阵列信号建模方法
  3. 004_JSONArray对象公共方法
  4. 【转载】SQL执行计划
  5. 洪筱楠(1996-),女,对外经济贸易大学国际经济贸易学院经济学荣誉学士实验班本科生。...
  6. 数据库工作笔记006---CentOS 初次登录mysql
  7. css标准流/非标准流 盒子模型
  8. 云数据库POLARDB优势解读之①——10分钟了解
  9. Python设计模式:建造者模式
  10. (2)安装宝塔与docker及docker镜像下载加速
  11. 惠达卫浴引入USB服务器远程管控网银U盾
  12. C++客户端面经总结
  13. 计算机网络四个阶段特点,计算机网络的发展分哪四个阶段,特点?
  14. adb shell 查看CPU架构
  15. (executor 1 exited caused by one of the running tasks) Reason: Executor heartbeat timed out after
  16. notification 发送通知后顶栏的小图标不对,为纯白色而不是设置的smallIcon 的原因
  17. 我的世界 服务器文件ess,求助服务器ess插件报错怎么解
  18. 计算机相关专业的兼职大总结
  19. Chap.15 总结《CL: An Introduction》 (Vyvyan Evans)
  20. Hudi同步Hive表报“HoodieException : Got runtime exception when hive syncing”错误的解决方法

热门文章

  1. 为什么BAT干不掉海康威视
  2. OpenCV图像处理专栏十七 | 清华大学《基于单幅图像的快速去雾》C++复现(有一定工程意义)
  3. 一阶电路暂态响应的结果分析。_【每日电路赏析】过流保护电路
  4. 外界键盘win键失灵的解决方法
  5. 2.1 rtthread pin设备详解
  6. 基于NVIDIA显卡的硬编解码的一点心得
  7. rownum sql值获取一个值_sql - 用MySQL计算中值的简单方法
  8. 游戏配音背后的秘密—准备篇
  9. 软工大牛Rijnard van Tonder 和 Claire Le Goues及其顶会论文解读
  10. 1521端口 mysql_Linux开放1521端口允许网络连接Oracle Listener