Skip to content

Commit

Permalink
fix: added appsettings.json
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorAlymov committed Jul 12, 2024
1 parent 4fcb19e commit 3999b5d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Sitko.Core.Search.OpenSearch;
public class OpenSearchModuleOptions : SearchModuleOptions
{
public string Prefix { get; set; } = "";
public string Url { get; set; } = "https://localhost:9200";
public string Url { get; set; } = "http://localhost:9200";
public string Login { get; set; } = "";
public string Password { get; set; } = "";
public bool EnableClientLogging { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ protected override IHostApplicationBuilder ConfigureApplication(IHostApplication
{
moduleOptions.Prefix = name.ToLower(CultureInfo.InvariantCulture);
moduleOptions.EnableClientLogging = true;
moduleOptions.Url = hostBuilder.Configuration.GetSection("OpenSearchModuleOptions")["Url"];
moduleOptions.Login = hostBuilder.Configuration.GetSection("OpenSearchModuleOptions")["Login"];
moduleOptions.Password = hostBuilder.Configuration.GetSection("OpenSearchModuleOptions")["Password"];
});
Expand Down
8 changes: 8 additions & 0 deletions tests/Sitko.Core.Search.OpenSearch.Tests/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"OpenSearchModuleOptions": {
"Login": "admin",
"Password": "shaydullinDA123@superMyPassword",
"Url": "https://localhost:9200",
"EnableClientLogging" : true
}
}

0 comments on commit 3999b5d

Please sign in to comment.