1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-29 13:25:17 +01:00

endpoint to display config settings (#1150)

This commit is contained in:
Kyle Spearrin 2021-02-18 15:15:08 -05:00 committed by GitHub
parent 1ca6e917af
commit 78606d5f13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,17 @@ namespace Bit.Icons.Controllers
return DateTime.UtcNow;
}
[HttpGet("~/config")]
public IActionResult GetConfig()
{
return new JsonResult(new
{
CacheEnabled = _iconsSettings.CacheEnabled,
CacheHours = _iconsSettings.CacheHours,
CacheSizeLimit = _iconsSettings.CacheSizeLimit
});
}
[HttpGet("{hostname}/icon.png")]
public async Task<IActionResult> Get(string hostname)
{