I simple make get req with ajax to elasticsearc to get all indices,
in browser it works here:

its same in my ajax, I expected the json data in browser return to my success method but failed:
Response is not JSON,
you can change the response to a JSON in your server program.
"Access-Control-Allow-Origin" to cross-host. Very well.http://www.test.local/../..., but the data provider is http://localhost:9200/_cat/..., in this case, your ajax request need to cross-host, just what you do with "Access-Control-Allow-Origin" if your two page are both the same host like:http://www.abc.local/../... ajax request did not need to cross-hostIt should work if you replace json by jsonp in your dataType parameter, like this:
$.ajax({
url: "http://localhost:9200/dicoms/dicoms/_search",
dataType: "jsonp", <--- change this
type: "GET",
success: function(data) {
...
});