elasticsearch - nginx CORS policy: No 'Access-Control-Allow-Origin error
#error message Access to XMLHttpRequest at 'http://192.168.0.102:9200/' from origin 'http://192.168.0.102' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. #solution [root@elkmaster ~]# vi /etc/elasticsearch/elasticsearch.yml [# # Make sure that the heap size is set to about half the memory available # on the system and that the owner of the process is allowed to use this # limit. # # Elasticsearch performs poorly when the system is swapping the memory. # # ---------------------------------- Network ----------------------------------- # # Set the bind address to a specific IP (IPv4 or IPv6): # #network.host: 192.168.0.1 network.host: 0.0.0.0 network.bind_host: 0.0.0.0 transport.host: 127.0.0.1 http.host: 0.0.0.0 http.cors.enabled: true http.cors.allow-origin: "*"