# Jsonp support in elasticsearch

**URL:** <https://discuss.elastic.co/t/jsonp-support-in-elasticsearch/35655>\
**Category:** Elasticsearch\
**Created:** [November 26, 2015, 10:59am UTC](https://discuss.elastic.co/t/jsonp-support-in-elasticsearch/35655 "2015-11-26T10:59:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy.m](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@andy.m](https://discuss.elastic.co/u/andy.m)\
**Post date:** [November 26, 2015, 10:59am UTC](https://discuss.elastic.co/t/jsonp-support-in-elasticsearch/35655/1 "2015-11-26T10:59:47Z")

</div>

Hello,

Reading the elastic search documentation here: [https://www.elastic.co/guide/en/elasticsearch/reference/1.4/common-options.html#\_jsonp](https://www.elastic.co/guide/en/elasticsearch/reference/1.4/common-options.html#_jsonp)

I see that adding http.jsonp.enable: true  
To the config.yaml file should enable jsonp responses from calls to the REST interface.

I've added this and restarted the ES node and am using jQuery to submit GET requests for the jsonp data type. I can see the request is being issued with the expected callback added to the url as a query parameter, however, the response from the server is still json. i.e. There is no padding being added to the response.

Given that the documentation refers to a config file which I don't have (I'm using ES2.1) I am wondering if jsonp is supported in the later versions of ES or if I have configured this node incorrectly.

Any assistance would be much appreciated.

Andy

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [November 26, 2015, 12:02pm UTC](https://discuss.elastic.co/t/jsonp-support-in-elasticsearch/35655/2 "2015-11-26T12:02:09Z")

</div>

JSONP has been removed since a long time [https://github.com/elastic/elasticsearch/issues/9108](https://github.com/elastic/elasticsearch/issues/9108)

Please use CORS

[https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#modules-http](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#modules-http)

---

<div class="post-metadata">

**Author:** ![andy.m](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@andy.m](https://discuss.elastic.co/u/andy.m)\
**Post date:** [November 26, 2015, 12:22pm UTC](https://discuss.elastic.co/t/jsonp-support-in-elasticsearch/35655/3 "2015-11-26T12:22:39Z")

</div>

Thanks for your help. CORS it is then.

---

<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:** [July 5, 2017, 11:35pm UTC](https://discuss.elastic.co/t/jsonp-support-in-elasticsearch/35655/4 "2017-07-05T23:35:38Z")

</div>


