D
D
Dmitry Baibukhtin2014-12-17 17:53:22
Yii
Dmitry Baibukhtin, 2014-12-17 17:53:22

Why is a 403 error thrown when making a request to REST Yii2 using the DELETE method?

Good evening. I am writing a single page application. With a GET request to REST Yii2, everything works fine (I haven’t tried other methods yet), but when a request is made using the DELETE method, a server error 403 (client denied by server configuration) is issued.
How should htaccess be configured so that the server would allow DELETE requests?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Baibukhtin, 2014-12-17
@PiloTeZ

I searched for an answer for a long time, eventually found it in the Apache configuration
Solution: write code in htaccess

<LimitExcept GET POST HEAD DELETE PUT>
    Require all denied
</LimitExcept>

I am not a server administrator, so I won’t say how safe and correct it is

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question