]> source.dussan.org Git - sonarqube.git/commitdiff
Fix compatibility of ES with KOPF
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 4 Aug 2016 09:57:18 +0000 (11:57 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 4 Aug 2016 09:57:18 +0000 (11:57 +0200)
Only for DEV purpose !

server/sonar-search/src/main/java/org/sonar/search/EsSettings.java

index 10a25971354e508ccd10d9882fba821bf3891737..5736ecd771f73bd2a2b4fd96f3765448ee7386d0 100644 (file)
@@ -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);