Я настроил Apache для возврата 200 по всем запросам, сделанным с OPTIONS
глагол:
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
Apache действительно возвращает статус 200 OK
, но в теле есть сообщение об ошибке:
HTTP/1.1 200 OK
Date: Sun, 22 Mar 2015 16:38:10 GMT
Server: Apache/2.4.10 (Win64) PHP/5.6.3
Content-Length: 492
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>200 OK</title>
</head><body>
<h1>OK</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at
admin@example.com to inform them of the time this error occurred,
and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
Почему так? Неправильная конфигурация?
@Maximus, вы должны использовать «204-No Content» в качестве кода ответа.
Подробности здесь: https://stackoverflow.com/a/32146203/2397394
Похоже на мягкий 404, это похоже на мягкий 500. Я бы посоветовал вам проверить конфигурацию apache для настроек, указанных в ссылке, чтобы узнать, может ли это быть вашей проблемой.