Commit d5cb7281 authored by Matija Obreza's avatar Matija Obreza

Made Elasticsearch HTTP configurable

parent 5381dd7f
......@@ -29,11 +29,17 @@ public class ElasticsearchConfigDev {
@Value("${elasticsearch.cluster.name}")
private String clusterName;
/**
* Allow HTTP traffic on port 9200. Useful for querying ES with curl.
*/
@Value("${elasticsearch.enable.http}")
private boolean enableHttp;
@Bean
public NodeClientFactoryBean ncfb() {
NodeClientFactoryBean ncfb = new NodeClientFactoryBean(true);
ncfb.setClusterName(clusterName);
ncfb.setEnableHttp(true);
ncfb.setEnableHttp(enableHttp);
return ncfb;
}
}
......@@ -138,6 +138,8 @@ cache.tileserver.eviction-policy=LRU
# Connection to Elasticsearch
elasticsearch.cluster.name=es-genesys-development
# Allow HTTP connections on port 9200
elasticsearch.enable.http=true
# Connect to external ES nodes. Comma separated list of hostname:port
# elasticsearch.cluster.nodes=localhost:9300,otherhost:9300
elasticsearch.cluster.nodes=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment