当前位置:网站首页>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请求成为“预检请求”。服务器成功响应预检请求后,才会发送真正的请求,并且携带真实数据。
边栏推荐
猜你喜欢

clickhouse原生监控项,系统表描述

用yml文件进行conda迁移环境时的报错小结

Why have the intelligent investment advisory products collectively taken off the shelves of banks become "chicken ribs"?

毕业五年,想当初若没有入行测试,我是否还会如这般焦虑

Markdown笔记简明教程

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

多态在代码中的体现

Markdown notes concise tutorial

It is urgent for enterprises to protect API security
测试媒资缓存问题
随机推荐
go搭建服务器基础
sqlserver 字符串类型转换成小数或者整数类型
升级kube出现unknown flag: --network-plugin
Analysis and proposal on the "sour Fox" vulnerability attack weapon platform of the US National Security Agency
漫谈Clickhouse Join
Iclr'22 spotlight | how to measure the amount of information in neural network weights?
Export El table as is to excel table
针对美国国家安全局“酸狐狸”漏洞攻击武器平台的分析与应对方案建议
Reading notes of Clickhouse principle analysis and Application Practice (3)
A group of K inverted linked lists
对多态的理解
防范未授权访问攻击的十项安全措施
DM8:生成DM AWR报告
Clickhouse Native Monitoring item, System table Description
It is urgent for enterprises to protect API security
《ClickHouse原理解析与应用实践》读书笔记(3)
开发技术-获取10分钟前的时间
k个一组反转链表
Electronic scheme development - Intelligent rope skipping scheme
FreeRTOS记录(九、一个裸机工程转FreeRTOS的实例)