fix startup

This commit is contained in:
Tommy Parnell
2022-06-01 21:39:45 -04:00
parent 844edb8fc1
commit 3136961955

View File

@@ -71,6 +71,10 @@ namespace TerribleDev.Blog.Web
})
.AddMemoryCache();
if(Env.IsProduction())
{
services.AddOutputCaching();
}
services.AddWebMarkupMin(a => {
a.AllowMinificationInDevelopmentEnvironment = true;
a.DisablePoweredByHttpHeaders = true;
@@ -134,7 +138,10 @@ namespace TerribleDev.Blog.Web
// },
UpgradeInsecureRequests = true
});
app.UseOutputCaching();
if(Env.IsProduction())
{
app.UseOutputCaching();
}
app.UseWebMarkupMin();
app.UseRouting();
app.UseEndpoints(endpoints =>