# Elasticsearch not allowing POST requests

**URL:** <https://discuss.elastic.co/t/elasticsearch-not-allowing-post-requests/197731>\
**Category:** Elasticsearch\
**Created:** [September 2, 2019, 7:12pm UTC](https://discuss.elastic.co/t/elasticsearch-not-allowing-post-requests/197731 "2019-09-02T19:12:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keith\_Sanks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_sanks/32/16719_2.png) [@Keith\_Sanks](https://discuss.elastic.co/u/Keith_Sanks)\
**Post date:** [September 2, 2019, 7:12pm UTC](https://discuss.elastic.co/t/elasticsearch-not-allowing-post-requests/197731/1 "2019-09-02T19:12:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jmorph99](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jmorph99/32/53466_2.png) [@jmorph99](https://discuss.elastic.co/u/jmorph99)\
**Post date:** [September 2, 2019, 11:23pm UTC](https://discuss.elastic.co/t/elasticsearch-not-allowing-post-requests/197731/2 "2019-09-02T23:23:07Z")

</div>

More than likely your query is formatted wrong.

---

<div class="post-metadata">

**Author:** ![Keith\_Sanks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_sanks/32/16719_2.png) [@Keith\_Sanks](https://discuss.elastic.co/u/Keith_Sanks)\
**Post date:** [September 2, 2019, 11:44pm UTC](https://discuss.elastic.co/t/elasticsearch-not-allowing-post-requests/197731/3 "2019-09-02T23:44:50Z")

</div>

This is following along with a training guide.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/f/1f78b913d921929fd083e813c7c7f134e17e7467.jpeg)

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.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/e/cee7cf8bf09b5c24acf1a32ae7b75d938dc9f3a2.jpeg)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/c/bc5427f2dec1838717d485c3f1e3db2c261f1fb0.png)

---

<div class="post-metadata">

**Author:** ![Keith\_Sanks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_sanks/32/16719_2.png) [@Keith\_Sanks](https://discuss.elastic.co/u/Keith_Sanks)\
**Post date:** [September 3, 2019, 12:22am UTC](https://discuss.elastic.co/t/elasticsearch-not-allowing-post-requests/197731/4 "2019-09-03T00:22:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 1, 2019, 12:22am UTC](https://discuss.elastic.co/t/elasticsearch-not-allowing-post-requests/197731/5 "2019-10-01T00:22:55Z")

</div>

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