【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 ...
随机推荐
- Context知识详解
Context知识详解 建议配合context知识架构图食用. 一.什么是Context 贴一个官方解释: Interface to global information about an appli ...
- 使用 ASP.NET Core MVC 创建 Web API——响应数据的内容协商(七)
使用 ASP.NET Core MVC 创建 Web API 使用 ASP.NET Core MVC 创建 Web API(一) 使用 ASP.NET Core MVC 创建 Web API(二) 使 ...
- pandas 初识(六)-可视化
Pandas 在一张图中绘制多条线 import pandas as pd import numpy as npimport matplotlib.pyplot as plt df = pd.Data ...
- springboot 打包jar 运行找资源文件
使用如下方式读取文件:ClassPathResource cpr = new ClassPathResource("static/ok.png");byte[] bdata = F ...
- JVM运行时数据区-详细结构图
- 打包vue文件,上传到服务器
主要步骤: 1. npm run build生成dist文件夹 2. 将dist文件夹上传到服务器上 3. 服务器上配置nginx,访问路径指向dist文件夹下的index.html,这样当访问ngi ...
- C lang:Protect array data——Const
Xx_Introduction Use pointer translate parameter array original data will change data,and use const p ...
- C/C++ 中的头文件 stdio.h和stdlib.h
stdio 就是指 “standard input & output" 标准输入输出 stdio.h所包含的函数: 文件访问fopenfreopenfflushfclose二进制输入 ...
- mysql初始化/usr/local/mysql/bin/mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory
[root@test153 ~]# /usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql - ...
- MySQL数据库~~~~~查询行(文件的内容)
1. 单表查询 语法 select distinct 字段 from 库名.表名 where 条件 group by 字段 # 分组 having 筛选 # 过滤 order by 字段 # 排序 l ...