Hi
By pulling latest image from https://hub.docker.com/_/elasticsearch/ I tried enabling CORS.
This is my dockerfile -
FROM docker.elastic.co/elasticsearch/elasticsearch:5.4.1
ADD elasticsearch.yml /usr/share/elasticsearch/config/
USER root
RUN chown elasticsearch:elasticsearch config/elasticsearch.yml
USER elasticsearch
This is my elasticsearch.yml -
http.host: 0.0.0.0
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
xpack.security.enabled: false
# Uncomment the following lines for a production cluster deployment
# #transport.host: 0.0.0.0
# #discovery.zen.minimum_master_nodes: 1
I am not sure why CORS is still not enabled , need help.