Skip to content

Commit

Permalink
Merge pull request DevArchitecture#93 from furkanaltaca/master
Browse files Browse the repository at this point in the history
Added elasticsearch authentication fields
  • Loading branch information
keremvaris authored Oct 15, 2023
2 parents a3936a3 + d79a0c6 commit 84e878c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/Utilities/ElasticSearch/ElasticSearchManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public ElasticSearchManager(IConfiguration configuration)
{
var settings = configuration.GetSection("ElasticSearchConfig").Get<ElasticSearchConfig>();
var uri = new System.Uri(settings.ConnectionString);
_connectionSettings = new ConnectionSettings(uri);
_connectionSettings = new ConnectionSettings(uri).BasicAuthentication(settings.UserName, settings.Password);;
}

public async Task<IResult> CreateNewIndexAsync(IndexModel indexModel)
Expand Down Expand Up @@ -178,4 +178,4 @@ private ElasticClient GetElasticClient(string indexName)
return new ElasticClient(_connectionSettings);
}
}
}
}

0 comments on commit 84e878c

Please sign in to comment.