After setting up a CORS REST server and modifying some code in my JavaScript pages that connect to its URLs, I ran into an issue with the DELETE ajax request no longer working. The changes included updating the URL from http://localhost/dev
to http://dev.local
. Although I updated the allowed origin for requests and confirmed that my GET
routes are functioning correctly, the DELETE
method is now being blocked (403 on the preflight), and I'm struggling to identify my mistake.
Below, you can find the details of the OPTIONS
and DELETE
interactions:
Request URL:http://localhost:9292/users/101
Request Method:OPTIONS
Status Code:200 OK
...
The response returned as "Forbidden." Here is the DELETE
request:
Request URL:http://localhost:9292/users/101
Request Method:DELETE
Status Code:403 Forbidden
...
If anyone has any insights or suggestions on how to troubleshoot this issue, I would greatly appreciate it.
Thank you, Dario.