comment add cache header for static files

This commit is contained in:
ngfrolov 2023-02-16 09:49:44 +05:00
parent b3c1f0ae9e
commit f30c3ce833
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7

View File

@ -107,7 +107,16 @@ namespace AsbCloudWebApi
//app.UseHttpsRedirection();
app.UseDefaultFiles();
app.UseStaticFiles();
app.UseStaticFiles(
//new StaticFileOptions
//{
// OnPrepareResponse = ctx =>
// {
// ctx.Context.Response.Headers.CacheControl = "public,max-age=2592000";
// ctx.Context.Response.Headers.Expires = DateTime.UtcNow.AddDays(10).ToString("R", CultureInfo.InvariantCulture);
// }
//}
);
app.UseCors("ClientPermission");
app.UseRouting();