From 99d6d35ba7001b4c261927a5114aec204dad3fce Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 4 Aug 2016 11:57:18 +0200 Subject: [PATCH] Fix compatibility of ES with KOPF Only for DEV purpose ! --- .../sonar-search/src/main/java/org/sonar/search/EsSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/sonar-search/src/main/java/org/sonar/search/EsSettings.java b/server/sonar-search/src/main/java/org/sonar/search/EsSettings.java index 10a25971354..5736ecd771f 100644 --- a/server/sonar-search/src/main/java/org/sonar/search/EsSettings.java +++ b/server/sonar-search/src/main/java/org/sonar/search/EsSettings.java @@ -134,6 +134,7 @@ public class EsSettings implements EsSettingsMBean { LOGGER.warn("Elasticsearch HTTP connector is enabled on port {}. MUST NOT BE USED FOR PRODUCTION", httpPort); // see https://github.com/lmenezes/elasticsearch-kopf/issues/195 builder.put("http.cors.enabled", true); + builder.put("http.cors.allow-origin", "*"); builder.put("http.enabled", true); builder.put("http.host", host.getHostAddress()); builder.put("http.port", httpPort); @@ -169,7 +170,6 @@ public class EsSettings implements EsSettingsMBean { builder.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, replicationFactor); builder.put("cluster.name", getClusterName()); builder.put("cluster.routing.allocation.awareness.attributes", "rack_id"); - String nodeName = getNodeName(); builder.put("node.rack_id", nodeName); builder.put("node.name", nodeName); builder.put("node.data", true); -- 2.39.5