diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2019-06-09 04:31:04 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-06-09 04:32:31 +0000 |
commit | 279a47f3f64fc7a414247922b870e58a0b334b0f (patch) | |
tree | 0e461194ea2542dacf34b51ab8bdf376e64e0ec0 /lib/PublicInbox | |
parent | 0b3e19584c90d958a723ac2d3dec3f84f5513688 (diff) | |
download | public-inbox-279a47f3f64fc7a414247922b870e58a0b334b0f.tar.gz |
I can imagine myself just wanting to clone a single v2 inbox and all its epochs without thinking about include/exclude rules in a grokmirror config file.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/WWW.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 614adad6..a5466980 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -126,6 +126,8 @@ sub call { get_text($ctx, $1, $2); } elsif ($path_info =~ m!$INBOX_RE/([a-zA-Z0-9_\-\.]+)\.css\z!o) { get_css($ctx, $1, $2); + } elsif ($path_info =~ m!$INBOX_RE/manifest\.js\.gz\z!o) { + get_inbox_manifest($ctx, $1, $2); } elsif ($path_info =~ m!$INBOX_RE/($OID_RE)/s/\z!o) { get_vcs_object($ctx, $1, $2); } elsif ($path_info =~ m!$INBOX_RE/($OID_RE)/s/ @@ -490,6 +492,15 @@ sub www_listing { } } +# GET $INBOX/manifest.js.gz +sub get_inbox_manifest ($$$) { + my ($ctx, $inbox, $key) = @_; + my $r404 = invalid_inbox($ctx, $inbox); + return $r404 if $r404; + require PublicInbox::WwwListing; + PublicInbox::WwwListing::js($ctx->{env}, [$ctx->{-inbox}]); +} + sub get_attach { my ($ctx, $idx, $fn) = @_; require PublicInbox::WwwAttach; |