Elasticsearch version: 5.1.1
Plugins installed: none
JVM version: 1.8
OS version: Win7, 64bit
As soon as the line http.cors.enabled: true is added to elasticsearch.yml and the server restarted queries begin to return 403.
I added the setting as described in elasticsearch-head to get the UI running.
Steps to reproduce:
http.cors.enabled: true to elasticsearch.yml No error appears in the console of ES.
POST /myb-all/_search?pretty
{
"from" : 0, "size" : 10,
"query": { "match_all": {} },
"_source": ["timestamp", "logfile", "type", "priority", "category"],
"sort": [{"timestamp": "desc"}]
}
Please see the other cors settings that you need to change in the documentation: https://www.elastic.co/guide/en/elasticsearch/reference/5.1/modules-http.html
OK, quickfix for secure settings (i.e. LAN):
http.cors.enabled: true
http.cors.allow-origin: "*"
Most helpful comment
OK, quickfix for secure settings (i.e. LAN):