From dc71fb1a997884b0adb3597400ed138b0009f0e9 Mon Sep 17 00:00:00 2001 From: Jeffrey Picard Date: Thu, 17 Jun 2021 11:38:27 -0400 Subject: [PATCH] Fix es host prefix --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 1084f35..d2428a8 100644 --- a/main.go +++ b/main.go @@ -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 }