0

my issue is closely related to Recently DELETE and PUT API of default magento 2 was not working, are these the permission issue?

I have move a working M2.3.4 install to a new server from centos 6 to centos 8. As such the apache version now is 2.4 and db now Maria10.3. My webapi calls were working fine previously but now whenever I try to call a PUT request at https://www.baseurl.com/rest/all/v1/products/XXX (sku) I get a 404 response from the server.

I have tried with my application and also with the swagger interface with the same results.

The rest on the frontend and bacend works fine and the GET request is working also.. Only the PUT request seems effected **UPDATE.. Tried a delete request and this also gives a 404. error.

It feels like a permissions issue but unsure where to start to debug.

user552769
  • 361
  • 6
  • 20

1 Answers1

0

ok Finally found out what was causing this.. 2.4 has various extra security but particular issue was being caused by mod_security. A rule was being trip by the PUT & DELETE requests. solution was to add a line to the httpd.conf to disabled the flagged rule in accordance with ModSecurity: Access denied with code 403 & SQL injection Detected

the error was shown in the error.log configured for the virtualhost in the httpd.conf file

user552769
  • 361
  • 6
  • 20