Skip to content

Commit

Permalink
feat(elastic): support https endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwanz committed Mar 1, 2025
1 parent c2f8c78 commit 005ca3d
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
@@ -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;

0 comments on commit 005ca3d

Please sign in to comment.