diff --git a/BudgetApp/Program.cs b/BudgetApp/Program.cs index 1f0e434..94df78f 100644 --- a/BudgetApp/Program.cs +++ b/BudgetApp/Program.cs @@ -112,7 +112,7 @@ if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Error", createScopeForErrors: true); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. - app.UseHsts(); + if (bool.Parse(Environment.GetEnvironmentVariable("ENABLE_HSTS") ?? "false")) app.UseHsts(); } app.UseStatusCodePagesWithReExecute("/not-found"); app.UseHttpsRedirection();