mirror of
https://github.com/bitwarden/server.git
synced 2025-02-17 02:01:53 +01:00
response caching for 24 hours
This commit is contained in:
parent
0cbd00e063
commit
ac901716cf
@ -27,6 +27,7 @@ namespace Bit.Icons.Controllers
|
||||
}
|
||||
|
||||
[HttpGet("")]
|
||||
[ResponseCache(Duration = 86400 /*24 hours*/, VaryByQueryKeys = new string[] { "url" })]
|
||||
public async Task<IActionResult> Get([FromQuery]string url)
|
||||
{
|
||||
if(string.IsNullOrWhiteSpace(url))
|
||||
|
@ -31,6 +31,7 @@ namespace Bit.Icons
|
||||
{
|
||||
options.SizeLimit = iconsSettings.CacheSizeLimit;
|
||||
});
|
||||
services.AddResponseCaching();
|
||||
|
||||
// Services
|
||||
services.AddSingleton<IDomainMappingService, DomainMappingService>();
|
||||
@ -46,6 +47,7 @@ namespace Bit.Icons
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
|
||||
app.UseResponseCaching();
|
||||
app.UseMvc();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user