I have an Nginx server and a PHP application running in PHP-FPM. The application is restful API. The problem is I get OPTIONS request which the application understands and supports, but the server blocks the request which never gets to the application and just displays HTML 405 Error.
Is there some directive to make Nginx serve OPTIONS the same way it serves other methods?
I found many tutorials to enable a response to OPTIONS directly from the Nginx but it doesn't solve my problem as only the application knows which methods are allowed for the URL.
Or am I missing something?