X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FManifestJsGz.pm;h=31cf15dcfe0b6b8df64ba0b8a479afe7d98542b2;hb=af0b0fb7a454470a32c452119d0392e0dedb3fe1;hp=fb7a45e733d084d6e47eeec056ffca6068c43f03;hpb=0d38f65c490466837ae091afa7a7b6f59d04ce7c;p=public-inbox.git
diff --git a/lib/PublicInbox/ManifestJsGz.pm b/lib/PublicInbox/ManifestJsGz.pm
index fb7a45e7..31cf15dc 100644
--- a/lib/PublicInbox/ManifestJsGz.pm
+++ b/lib/PublicInbox/ManifestJsGz.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2020 all contributors
+# Copyright (C) 2020-2021 all contributors
# License: AGPL-3.0+
# generates manifest.js.gz for grokmirror(1)
@@ -11,7 +11,7 @@ use PublicInbox::Config;
use IO::Compress::Gzip qw(gzip);
use HTTP::Date qw(time2str);
-our $json = PublicInbox::Config::json();
+my $json = PublicInbox::Config::json();
# called by WwwListing
sub url_regexp {
@@ -61,6 +61,7 @@ sub eidx_manifest_add ($$$) {
my ($ctx, $ALL, $ibx) = @_;
if (my $data = $ALL->misc->inbox_data($ibx)) {
$data = $json->decode($data);
+ delete $data->{''}; # private
while (my ($url_path, $ent) = each %$data) {
inject_entry($ctx, $url_path, $ent);
}
@@ -98,4 +99,11 @@ sub psgi_triple {
'Content-Length', bytes::length($out) ], [ $out ] ]
}
+sub per_inbox {
+ my ($ctx) = @_;
+ # only one inbox, slow is probably OK
+ slow_manifest_add($ctx, $ctx->{ibx});
+ psgi_triple($ctx);
+}
+
1;