forked from ddrilling/AsbCloudServer
comment add cache header for static files
This commit is contained in:
parent
b3c1f0ae9e
commit
f30c3ce833
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user