【Https异常】This request has been blocked; the content must be served over HTTPS
一、问题出现场景
项目从http升级到https后,jsp页面存在发送http请求的情况下就会出现该异常。因为HTTPS 是 HTTP over Secure Socket Layer,以安全为目标的 HTTP 通道,所以在 HTTPS 承载的页面上不允许出现 http 请求。
二、解决办法
在jsp页面中,添加下面的meta头就可以了
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
</head>
<body>
<script type="text/javascript">
</script>
</body>
</html>
【Https异常】This request has been blocked; the content must be served over HTTPS的更多相关文章
- 在普通网页显示正常,加Https报This request has been blocked; the content must be served over HTTPS.,https网站加载http资源时,http资源被block
解决办法 :在html头加<meta http-equiv="Content-Security-Policy" content="upgrade-insecure- ...
- Mixed Content: xxx This request has been blocked; the content must be served over HTTPS.
在升级https的过程中,出现如下问题: Mixed Content: The page at 'https://www.xxx.com/denglu.html' was loaded over HT ...
- https下 http的会被阻塞 This request has been blocked; the content must be served over HTTPS.
如何在HTTPS 网页中引入HTTP资源: Mixed Content? https://segmentfault.com/q/1010000005872734/a-1020000005874533 ...
- This request has been blocked; the content must be served over HTTPS.处理方案
在页面head标签中加入 <meta http-equiv="Content-Security-Policy" content="upgrade-insecure- ...
- 网页中嵌入百度地图报错:The request has been blocked,the content must served over Https
网页中嵌入百度地图 1.进入百度地图开发平台:http://lbsyun.baidu.com/index.php?title=jspopular 2.获取密钥:http://lbsyun.baidu. ...
- Cross-origin plugin content from must have a visible size larger than 400 x 300 pixels, or it will be blocked. Invisible content is always blocked.
Cross-origin plugin content from must have a visible size larger than 400 x 300 pixels, or it will ...
- (七)VMware Harbor 问题:Get https://192.168.3.135:8088/v2/: http:server gave HTTP response to HTTPS client
(一)问题描述 登陆时,报错 docker Get https://192.168.3.135:8088/v2/: http:server gave HTTP response to HTTPS cl ...
- This content should also be served over HTTPS
HTTPS 是 HTTP over Secure Socket Layer,以安全为目标的 HTTP 通道,所以在 HTTPS 承载的页面上不允许出现 http 请求,一旦出现就是提示或报错: jqu ...
- @RequestBody对象为空,异常Required request body is missing错误解决
1.异常 org.springframework.http.converter.HttpMessageNotReadableException: Required request body is mi ...
随机推荐
- Elon Mask 写作常见的三种错误
(其实非常的文不对题,这篇文章和写作的并没有多大的关系,如果是想看关于写作的技巧,可以直接离开,节省您的时间) 这是原文 写作就是在把你自身的想法用正确,合适的方式表达出来,但是不正确的表达可能会导致 ...
- mysql的锁机制详解
这段时间一直在学习mysql数据库.项目组一直用的是oracle,所以对mysql的了解也不深.本文主要是对mysql锁的总结. Mysql的锁主要分为3大类: 表级锁:存储引擎为Myisam.锁住整 ...
- SpringBoot系列随笔 - BootJar的启动方式
前言 写完maven的加密插件后,尝试在boot启动时的类加载过程中编写解密代码时,发现了一个平常没有注意的地方. 那就是boot-jar的启动方式与我们平常编写的可执行jar是存在很大差别的. 所以 ...
- ASP.NET底层原理
上图基本上演示了IIS 6整个处理过程.在User Mode下,http.sys接收到一个基于aspx的http request,然后它会根据IIS中的Metabase查看该基于该Request的Ap ...
- IDEA新建Spring配置文件的方法
IDEA创建Spring Config 选择项目文件右键 输入文件名称即可 applicationContext.xml
- 腾讯 Techo 开发者大会首发来袭!云原生中间件技术实践等你来!
腾讯 Techo 开发者大会是由腾讯云发起的面向全球开发者和技术爱好者的年度盛会,2019 年 11 月 6 日 - 7 日将在北京嘉里大酒店首次召开. 作为一个专注于前沿技术研讨的非商业大会,Tec ...
- InnoDB Architecture (InnoDB In-Memory Structures 转载)
转载.节选于 https://dev.mysql.com/doc/refman/8.0/en/innodb-in-memory-structures.html InnoDB Architecture ...
- 检测值是否存在(??)(Freemarker的null值处理)
使用形式: unsafe_expr?? 或 (unsafe_expr)?? 这个操作符告诉我们一个值是否存在.基于这种情况, 结果是 true 或 false. 访问非顶层变量的使用规则和默认值操作符 ...
- V4 Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup (Doc ID 2471245.1)
V4 Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup (Doc ID 2471245. ...
- 游戏《Minecraft》IntelliJ下模组开发环境ForgeGradle的使用教程
嗯,当你想搞个模组的时候,肯定需要用到FG. 就比如编译模组的时候. 很好,首先下载源码去. files.minecraftforge.net/ 然后打开命令行到源码目录下 执行命令~ Win: ...