Fix es host prefix

This commit is contained in:
Jeffrey Picard 2021-06-17 11:38:27 -04:00
parent e5a9a23e9b
commit dc71fb1a99

View file

@ -87,6 +87,10 @@ func parseArgs(searchRequest *pb.SearchRequest) *server.Args {
args.EsHost = esHost
}
if !strings.HasPrefix(args.EsHost, "http") {
args.EsHost = "http://" + args.EsHost
}
if esPort, ok := environment["ELASTIC_PORT"]; ok {
args.EsPort = esPort
}