about summary refs log tree commit homepage
path: root/lib/PublicInbox/Config.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-10-08 08:24:45 +0000
committerEric Wong <e@80x24.org>2022-10-09 16:48:37 +0000
commit2bc26fececd03705c68c1968f95a2d199bafec29 (patch)
tree900a1080687adc7ec7877e6d9123a570f4b14804 /lib/PublicInbox/Config.pm
parent8bd0fadfe7fcc7c44a3478ffefede71f24319441 (diff)
downloadpublic-inbox-2bc26fececd03705c68c1968f95a2d199bafec29.tar.gz
This also ensures we won't waste CPU cycles on snapshots
which aren't configured if somebody attempts them by
guessing URLs.
Diffstat (limited to 'lib/PublicInbox/Config.pm')
-rw-r--r--lib/PublicInbox/Config.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm
index 5cdf182e..a430cd5c 100644
--- a/lib/PublicInbox/Config.pm
+++ b/lib/PublicInbox/Config.pm
@@ -325,6 +325,8 @@ sub parse_cgitrc {
                 } elsif (m!\A(?:css|favicon|logo|repo\.logo)=(/.+)\z!) {
                         # absolute paths for static files via PublicInbox::Cgit
                         $self->{-cgit_static}->{$1} = 1;
+                } elsif (s!\Asnapshots=\s*!!) {
+                        $self->{'coderepo.snapshots'} = $_;
                 }
         }
         cgit_repo_merge($self, $repo->{dir}, $repo) if $repo;