October 24, 2024
Chicago 12, Melborne City, USA
PHP

How to properly handle a preflight request?


I have an API in PHP but preflight requests follow the same code path as normal requests and receives a 400 because of missing body, is it okay to just make an if statement for the OPTIONS request and return a 200? do I need to do anything else?



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video