简体   繁体   中英

DELETE method does not work with PHP + Slim Framework + nginx

I have run into a strange issue with my server setup. I have nginx installed with php-fastcgi and MySQL running on Ubuntu 12.04 LTS. I am using Slim Framework for running my website. For some reason, the DELETE method does not work for any URL endpoint on the server. I just get this error when I fire a DELETE request through Postman:

<HTML>
<HEAD>
<TITLE>Access Denied</TITLE>
</HEAD>

<BODY BGCOLOR="white" FGCOLOR="black">
<H1>Access Denied</H1>
<HR>

<FONT FACE="Helvetica,Arial"><B>
Description: You are not allowed to access the document you requested.
</B></FONT>
<HR>
</BODY>

This is happening for all domains and all endpoints on the server. I don't see anything in the access logs either. The method was working earlier so I am guessing some update changed things.

Any idea which process would generate this error and how can this be fixed?

I finally figured out that my network was blocking all DELETE calls.

It started working when I tested it on a different router and network.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM