A
A
artman9k2015-12-04 19:00:04
PHP
artman9k, 2015-12-04 19:00:04

How to define REQUEST_METHOD PUT / DELETE in PHP (yii2)?

How to recognize REQUEST_METHOD PUT / DELETE in yii2?
If you request $_SERVER - does it issue a GET on them?
And also, how to properly configure nginx so that it does not issue PUT / DELETE 405?
I did it like this: "error_page 405 =200 $uri;" but I suspect that this is wrong.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2015-12-04
@Sanasol

On nginx, for example, support for such methods is disabled by default.
Enabled via the line
dav_methods PUT DELETE MKCOL COPY MOVE;
in the server{ } directive

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question