Not passing post request on a sub-domain (Access-Control-Allow-Origin) c safari, how to solve the problem?

The problem is this.
There are for example ajax requests with content type json. They occur in the following order. At first there is a request with a type of OPTIONS where the DIN is transmitted, to check their server. And then comes the query itself with these DIN.
So. The problem is this just in Safari, the first request type is OPTIONS, does not pass. Gives an error that not a valid type for the request. Although there are rules for these types
->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS')
Yes, and it works in other browsers (all)
What it can be connected. Any thoughts will help.
March 23rd 20 at 19:25
1 answer
March 23rd 20 at 19:27
Get the content type, and options will not go away. For content type, Safari is right:
A header is said to be a simple header if the header field name is an ASCII case-insensitive match for Accept, Accept-Language or Content-Language or if it is an ASCII case-insensitive match for Content-Type and the header field value media type (excluding parameters) is an ASCII case-insensitive match for application/x-www-form-urlencoded, multipart/form-data, or text/plain.
https://www.w3.org/TR/cors/#simple-header

Find more questions by tags AJAX