do you have an example request that works and one that does not (so one can reproduce this using curl?), also there is a http.cors.allow-methods, that supports PUT and POST as well, but maybe it is overwritten?
Can you paste the output of curl -v 'localhost:9200/_nodes/settings?filter_path=**.cors'
Can you provide original requests including the headers, so we can reproduce them via curl and see what happens. Also the responses are not pasted here, so the error message cannot be seen.
hi Alex
I have identified the root cause why I got 403 forbidden error for all POST and PUT requests after trying repro using cURL.
It is because I used postman to send request to my cluster, and postman by default will always append the Origin header for POST and PUT request with following value: chrome-extension://xxxxxx
And it does not match the allowed origin setting in my elasticsearch.yml: http.cors.allow-origin: /https?://.+?(:[0-9]+)?/
So got 403 forbidden.
With cURL, I did not append any header in request, so worked as expected.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.