Elasticsearch not allowing POST requests

I've run into an issue that Elasticsearch is not allowing POST requests using Postman, even after adding the following:
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, POST, PUT, GET, DELETE
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"

I get the following returned:
{
"error": "Incorrect HTTP method for uri [/kb_articles] and method [POST], allowed: [PUT, HEAD, GET, DELETE]",
"status": 405
}
What it looks like is that Elastic is not accepting the configs or there is another config file overwriting the type of requests allowed. This is a fairly new install, and I haven't added any other configs, I've only modified the /etc/elasticsearch/elasticsearch.yml file with the code above.

More than likely your query is formatted wrong.

This is following along with a training guide.

Making sure that I've written the code properly, the training video appears to have exactly as what I had typed but seems to work for them.


I do appreciate the help, I was able to find the issue.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.