feat: add HSTS middleware for production environment
This commit is contained in:
@@ -107,6 +107,11 @@ if (app.Environment.IsDevelopment())
|
|||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (app.Environment.IsProduction())
|
||||||
|
{
|
||||||
|
app.UseHsts();
|
||||||
|
}
|
||||||
|
|
||||||
app.UseHealthChecks("/health", new HealthCheckOptions
|
app.UseHealthChecks("/health", new HealthCheckOptions
|
||||||
{
|
{
|
||||||
Predicate = _ => true,
|
Predicate = _ => true,
|
||||||
|
|||||||
Reference in New Issue
Block a user