From 78606d5f1390598f3d381f640d8d0ad6c5c49c80 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 18 Feb 2021 15:15:08 -0500 Subject: [PATCH] endpoint to display config settings (#1150) --- src/Icons/Controllers/IconsController.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Icons/Controllers/IconsController.cs b/src/Icons/Controllers/IconsController.cs index b172a9700..1ed71b51f 100644 --- a/src/Icons/Controllers/IconsController.cs +++ b/src/Icons/Controllers/IconsController.cs @@ -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 Get(string hostname) {