Na hostingu nefunguju requesty s metodou OPTIONS?

61 zhlédnutíWebhostingCORS OPTIONS
0

Dobry den,

snazim sa povolit CORS na mojom hostingu. CORS funguje, pokial vytvaram POST requesty napr. pomocou programu POSTMAN alebo ked spustim Chrome browser v mode s povolenym CORS, ale v normalnom mode browser najprv. vytvara tzv. „preflight“ request s metodou OPTIONS. Problem je, ze v tomto pripade dany request ani nemozem zachytit v mojom PHP kode. Ked takyto request typu OPTIONS skusim odoslat v POSTMAN, tak dostanem takuto response:

<!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
hosting@wedos.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>

Tento text nepochadza z mojho kodu, tak by som sa chcel spytat v com moze byt problem. Je treba nieco nastavit vo webhostingu?

Role: Zákazník
publikoval nový komentář

Bola to moja chyba, zle som odchytaval OPTIONS requesty v mojom kode routingu.

Kategorie