To set up the correct test suite for CORS (cross-domain requests), I need to be able to process the HTTP OPTIONS method directly from the script. Therefore, I have a simple PHP script that defines the OPTIONS method and reacts accordingly by outputting some specific headers.
The PHP side is not a problem. If I use curl to give out GET / POST / HEAD / PUT / etc. they all turn to the script, and it handles them clearly. However, if I issue an OPTIONS request, it never reaches the script: Apache immediately responds to a list of a set of methods that, in its opinion, are suitable for this resource. I can say that the script does not run (no registration, none of its output files respond to it, etc.).
I look through the Apache configuration, make sure that the appropriate .htaccess is not suitable, I changed a bunch of things like the Limit / LimitExcept directives, but I can not get it to change its behavior. I also tried to find technology information from my youth that could help here: NPH scripts (untreated headers); but apparently this has disappeared (at least I cannot find any information about this that works).
So the question is this: how do I configure Apache to allow my script to describe OPTIONS?
source share