Skip to content

Commit

Permalink
feat(elastic): support https endpoint (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwanz authored Mar 3, 2025
1 parent c2f8c78 commit 2eccc1f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Opserver.Core/Data/Elastic/ElasticCluster.KnownNodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,15 @@ public ElasticNode(string hostAndPort, ElasticSettings.Cluster clusterSettings)
Host = hostAndPort;
Port = DefaultElasticPort;
}
Url = $"http://{Host}:{Port}/";

if (Port == 443)
{
Url = $"https://{Host}/";
}
else
{
Url = $"http://{Host}:{Port}/";
}
}

public override string ToString() => Host;
Expand Down

0 comments on commit 2eccc1f

Please sign in to comment.