当前位置:网站首页>1-20 预检请求
1-20 预检请求
2022-06-30 21:26:00 【画不完的饼】
预检请求
CORS请求的分类
客户端在请求CORS借口时,根据请求方式和请求头的不同,可以讲CORS的请求分为两大类,分别是:
1. 简单请求
同时满足以下两大条件的请求,就属于简单请求:
(1)请求方式:GET、POST、HEAD三者之一
(2)HTTP头部信息不超过以下几种字段:
无自定义头部字段、Accept、Accept-Language、Content-Language、DPR、Downlink、Save-Data、Viewport-Width、Width、Content-Type(只有三个值application/x-www-form-urlencoded、multipart/form-data、text/plain)
2. 预检请求
只要符合以下任何一个条件的请求,都需要进行预检请求:
- 请求方式为GET、POST、HEAD、之外的请求Method类型
- 请求头中包含自定义头部字段
- 向服务器发送了application/json格式的数据
在浏览器与服务器正式通信之前,浏览器会先发送OPTION请求进行预检,以获知服务器是否允许该实际请求,所以这一次的OPTION请求成为“预检请求”。服务器成功响应预检请求后,才会发送真正的请求,并且携带真实数据。
边栏推荐
- ca i啊几次哦啊句iu家哦
- Understanding polymorphism
- 等级测评是什么意思?工作流程包含哪些?
- Is it safe to open an account for stock trading on mobile phones?
- 对多态的理解
- What happens when word encounters an error while trying to open a file?
- pytorch geometric torch-scatter和torch-sparse安装报错问题解决
- 防范未授权访问攻击的十项安全措施
- ArcGIS construction and release of simple road network data service and rest call test
- ICML2022 | 序列决策的效用理论
猜你喜欢

It is urgent for enterprises to protect API security

Phoenix architecture: an architect's perspective

Et la dégradation du modèle de génération de texte? Simctg vous donne la réponse

asp.net core JWT传递

Radar data processing technology

MySQL advanced 3

《ClickHouse原理解析与应用实践》读书笔记(3)

Text recognition svtr paper interpretation

Oracle 数据库表结构 Excel 导出

Clickhouse native monitoring item, system table description
随机推荐
[grade evaluator] how to register a grade evaluator? How many passes?
“信任机器”为发展赋能
Phoenix architecture: an architect's perspective
. NETCORE redis geo type
Radar data processing technology
FreeRTOS记录(九、一个裸机工程转FreeRTOS的实例)
做一个 Scrollbar 的思考
ssh 默认端口不是22时的一些问题
.netcore redis GEO类型
Markdown notes concise tutorial
Auto-created primary key used when not defining a primary key
《ClickHouse原理解析与应用实践》读书笔记(1)
一文读懂什么是MySQL索引下推(ICP)
《ClickHouse原理解析与应用实践》读书笔记(2)
What about degradation of text generation model? Simctg tells you the answer
A small step in code change and a big leap in thinking
Is it safe to open an account for stock trading on mobile phones?
网络营销之四大误解
将博客搬至CSDN
pytorch geometric torch-scatter和torch-sparse安装报错问题解决