From 0e0554de4c1d85c173a4f27ed4c2165475b043fb Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 15 Jul 2026 10:45:22 -1000 Subject: Gate the cache listing behind enable-cache-list The ls_cache page printed the cache directory path and the urls other visitors had requested, with no gate at all. --- source/cgit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/cgit.c') diff --git a/source/cgit.c b/source/cgit.c index ca318e8..91dd9a7 100644 --- a/source/cgit.c +++ b/source/cgit.c @@ -201,6 +201,8 @@ static void config_cb(const char *name, const char *value) ctx.cfg.enable_tree_linenumbers = atoi(value); else if (!strcmp(name, "enable-git-config")) ctx.cfg.enable_git_config = atoi(value); + else if (!strcmp(name, "enable-cache-list")) + ctx.cfg.enable_cache_list = atoi(value); else if (!strcmp(name, "max-stats")) ctx.cfg.max_stats = cgit_find_stats_period(value, NULL); else if (!strcmp(name, "cache-size")) -- cgit 2.12.1