次のドキュメントを参照して、飛行前のリクエストを回避する方法をご覧ください。飛行前のリクエストが必須の場合は、適切なメソッド、起点、およびヘッダーを使用してサーバーで修正する必要があります。
プリフライトリクエストが送信される時期は、以下のドキュメントで明確に文書化されています。
https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
In particular, a request is preflighted if any of the following conditions is true:
If the request uses any of the following methods:
PUT
DELETE
CONNECT
OPTIONS
TRACE
PATCH
Or if, apart from the headers set automatically by the user agent (for example, Connection, User-Agent, or any of the other header with a name defined in the Fetch spec as a “forbidden header name”), the request includes any headers other than those which the Fetch spec defines as being a “CORS-safelisted request-header”, which are the following:
Accept
Accept-Language
Content-Language
Content-Type (but note the additional requirements below)
Last-Event-ID
DPR
Downlink
Save-Data
Viewport-Width
Width
Or if the Content-Type header has a value other than the following:
application/x-www-form-urlencoded
multipart/form-data
text/plain
Or if one or more event listeners are registered on an XMLHttpRequestUpload object used in the request.
Or if a ReadableStream object is used in the request.