Skip to content

Commit

Permalink
Add option for SSL
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryba1986 committed Oct 29, 2023
1 parent b9a4662 commit 17ef4a4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Phoenix.Api.Client/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"Database": "Phoenix",
"Username": "Phoenix",
"Password": "Phoenix",
"EnableSsl": true,
"CommandTimeout": 600
}
}
1 change: 1 addition & 0 deletions src/Phoenix.Api.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"Database": "Phoenix",
"Username": "Phoenix",
"Password": "Phoenix",
"EnableSsl": true,
"CommandTimeout": 600
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ protected override void Load(ContainerBuilder builder)
Password = settings.Password,
CommandTimeout = settings.CommandTimeout,
Pooling = true,
SslMode = SslMode.Allow,
SslMode = settings.EnableSsl
? SslMode.Prefer
: SslMode.Allow,
};

DbContextOptions<UnitOfWork> contextOptions = new DbContextOptionsBuilder<UnitOfWork>()
Expand Down
1 change: 1 addition & 0 deletions src/Phoenix.Services/Settings/SqlSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ internal sealed class SqlSettings
public string Database { get; init; }
public string Username { get; init; }
public string Password { get; init; }
public bool EnableSsl { get; init; }
public ushort CommandTimeout { get; init; }

public SqlSettings()
Expand Down

0 comments on commit 17ef4a4

Please sign in to comment.