I've been trying to use PATCH for an API I'm building. All requests fail because of CORS. I've tried editing my website's .htaccess file to include the following:
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "PUT, OPTIONS, GET, POST, DELETE"
Yet, it continues saying that "CORS Preflight did not succeed", even though both headers appear as been sent in the request.
I'm using jQuery's ajax method to send the request if that can help.
What did I do wrong? How can I fix that?
Thanks in advance, and sorry if this has already been answered. So far, none of the answers worked.