jonroberts
11/06/2023, 3:50 PMCodeSharePaul
11/06/2023, 3:55 PMCodeSharePaul
11/06/2023, 3:58 PMcs
app.UseWhen(
context => !context.Request.Path.StartsWithSegments("/umbraco")
&& !context.Request.Path.StartsWithSegments("/media"),
appBuilder => appBuilder.UseStaticFiles(new StaticFileOptions
{
OnPrepareResponse = ctx =>
{
var cacheMaxAgeThirtyDays = (60 * 60 * 24 * 30).ToString();
ctx.Context.Response.Headers[HeaderNames.CacheControl] =
"public, max-age=" + cacheMaxAgeThirtyDays;
}
})
);
jonroberts
11/06/2023, 4:04 PMjonroberts
11/07/2023, 12:05 PMCodeSharePaul
11/07/2023, 12:05 PMCodeSharePaul
11/07/2023, 12:06 PMjonroberts
11/07/2023, 12:06 PMjonroberts
11/07/2023, 12:06 PMjonroberts
11/07/2023, 12:07 PMCodeSharePaul
11/07/2023, 12:10 PMCodeSharePaul
11/07/2023, 12:11 PMjonroberts
11/07/2023, 12:12 PMjonroberts
11/07/2023, 12:12 PM