mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added user photo caching
This commit is contained in:
@@ -102,11 +102,20 @@ app.UseStaticFiles(new StaticFileOptions
|
|||||||
Public = true,
|
Public = true,
|
||||||
MaxAge = TimeSpan.FromDays(365)
|
MaxAge = TimeSpan.FromDays(365)
|
||||||
};
|
};
|
||||||
|
} else if (requestPath.Contains("UserPhoto"))
|
||||||
|
{
|
||||||
|
ctx.Context.Response.GetTypedHeaders().CacheControl =
|
||||||
|
new Microsoft.Net.Http.Headers.CacheControlHeaderValue()
|
||||||
|
{
|
||||||
|
Public = true,
|
||||||
|
MaxAge = TimeSpan.FromMinutes(5)
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
app.UseResponseCaching();
|
||||||
app.UseResponseCompression();
|
app.UseResponseCompression();
|
||||||
|
|
||||||
string[] supportedCultures = ["de", "en"];
|
string[] supportedCultures = ["de", "en"];
|
||||||
|
|||||||
Reference in New Issue
Block a user