1

In a lecture I recently had, one of the speakers commented that the only methods that APACHE and NGINX actually accept / support are the GET and POST methods / verbs.

The speaker further clarifies that when other methods such as PUT, PATCH, DELETE and others are used, APACHE and NGINX mask the method, in other words, the methods are converted to GET and POST and passed to the application containing a flag of the old method sent. So the application will know which method was actually sent.

My question is: Are the methods / verbs really accepted by APACHE and the NGINX or the procedure contextualized in the question is what really happens?

DNick
  • 173
  • 5
  • I don't think this is the case. Apache just passes the method name on. – Julian Reschke Jul 04 '17 at 21:51
  • I don't think the speaker's statement is correct. How would Nginx or Apache support CORS if `OPTIONS` is not supported? AFAIK, Nginx may disable some HTTP methods by default, and configuration/module is needed to enable them. However, this does NOT mean those methods are not accepted/supported by Nginx. Please check: https://stackoverflow.com/questions/16912270/how-do-i-allow-a-put-file-request-on-nginx-server – shaochuancs Jul 04 '17 at 23:51
  • I know the APACHE 2.2+ exists the `` to control the http methods accepted. And it can be configured by APACHE config or _.htaccess_, like this: ` instructions `. And I found this [site](https://httpd.apache.org/docs/2.4/mod/mod_allowmethods.html) that talk about APACHE 2.4+ have a module called mod_allowmethods. In resume, you can define what methods can be accepted, like this: ` AllowMethods GET POST OPTIONS ` – DNick Jul 06 '17 at 11:09

0 Answers0