How to setup Elasticsearch connection string with username and password? #593
-
I'm trying to setup my AWS opensearch with the following settings, so how can I provide username and password along with connection string?
|
Beta Was this translation helpful? Give feedback.
Answered by
thepirat000
Mar 31, 2023
Replies: 1 comment
-
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)
...); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
alabady
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can pass an instance of a ConnectionSettings: