Skip to content

How to setup Elasticsearch connection string with username and password? #593

Answered by thepirat000
alabady asked this question in Q&A
Discussion options

You must be logged in to vote

You can pass an instance of a ConnectionSettings:

var cnnSettings = new AuditConnectionSettings(new Uri("https://url")).BasicAuthentication("user", "pass"));
Audit.Core.Configuration.Setup()
  .UseElasticsearch(x => x
    .ConnectionSettings(cnnSettings)
    ...); 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alabady
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants