refactorisation de la configuration
This commit is contained in:
@ -13,17 +13,16 @@ namespace nuget_host.Controllers
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
readonly IHostingEnvironment _environment;
|
||||
public IDataProtector DataProtector { get; }
|
||||
public SmtpSettings Options { get; } //set only via Secret Manager
|
||||
public SmtpSettings _smtpSettings { get; } //set only via Secret Manager
|
||||
|
||||
public HomeController(
|
||||
IOptions<SmtpSettings> smtpSettings,
|
||||
IDataProtectionProvider provider, Microsoft.AspNetCore.Hosting.IHostingEnvironment environment, ILogger<HomeController> logger)
|
||||
IHostingEnvironment environment,
|
||||
ILogger<HomeController> logger)
|
||||
{
|
||||
_environment = environment;
|
||||
_logger = logger;
|
||||
Options = smtpSettings.Value;
|
||||
DataProtector = provider.CreateProtector(Options.ProtectionTitle);
|
||||
_smtpSettings = smtpSettings.Value;
|
||||
}
|
||||
|
||||
public IActionResult Index()
|
||||
|
Reference in New Issue
Block a user