CORS规范中有两种类型:
- Simple requests
- Preflighted requests
前者无需额外的处理,但对于内容类型的支持,仅限三种:
- application/x-www-form-urlencoded
- multipart/form-data
- text/plain
对于除此以外的内容类型,比如application/json,CORS
会以预检请求
方式(Preflighted requests)处理。
CORS规范中有两种类型:
前者无需额外的处理,但对于内容类型的支持,仅限三种:
对于除此以外的内容类型,比如application/json,CORS
会以预检请求
方式(Preflighted requests)处理。