Preflights(option) 请求的正确成功状态代码是什么?

What is the correct success status code for Preflights(option) request?

我们正在为旧后端 (java) 开发新前端 (angular)。启用 cors 后,所有请求(POST)都按预期工作。

But preflights(option) request response with 'status code 202 OK'.

所以在深入研究和更改 'the working code' 之前,我想问一下,'Preflights (option)' 请求的标准成功代码是什么?

根据规范 https://fetch.spec.whatwg.org/#cors-preflight-fetch,

200 到 299 之间的任何值都可以。

您应该只发回您通常为任何其他 OPTIONS 请求发回的 CORS 预检 OPTIONS 请求的状态。相关规格仅此而已。