diff options
author | Eric Wong <e@80x24.org> | 2023-02-21 12:17:44 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-02-21 23:42:19 +0000 |
commit | 752af98576ae3e68a301e07f11f023f3bf941152 (patch) | |
tree | 16eb3836aac5469f7552702c36187876ede065cd /script | |
parent | 4ffad9b0a60f40ee9717e22000c233fcba30b30d (diff) | |
download | public-inbox-752af98576ae3e68a301e07f11f023f3bf941152.tar.gz |
Since PublicInbox::WWW already generates manifest.js.gz, I'm using an alternate path with PublicInbox::WwwStatic to host the manifest.js.gz for coderepos at an alternate location. The following snippet lets me host https://yhbt.net/lore/pub/manifest.js.gz for mirrored git repositories, while https://yhbt.net/lore/manifest.js.gz (no `pub') remains for inbox mirroring. ==> sample.psgi <== use PublicInbox::WWW; use PublicInbox::WwwStatic; my $www = PublicInbox::WWW->new; # use default PI_CONFIG my $st = PublicInbox::WwwStatic->new(docroot => '/path/to/code'); my $www_cb = sub { my ($env) = @_; if ($env->{PATH_INFO} eq '/pub/manifest.js.gz') { local $env->{PATH_INFO} = '/manifest.js.gz'; my $res = $st->call($env); return $res if $res->[0] != 404; } $www->call($env); }; builder { enable 'ReverseProxy'; enable 'Head'; mount '/lore' => $www_cb; }
Diffstat (limited to 'script')
-rwxr-xr-x | script/public-inbox-clone | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/script/public-inbox-clone b/script/public-inbox-clone index 598979bc..10ad3487 100755 --- a/script/public-inbox-clone +++ b/script/public-inbox-clone @@ -27,7 +27,7 @@ EOF # support both :/ GetOptions($opt, qw(help|h quiet|q verbose|v+ C=s@ c=s@ include|I=s@ exclude=s@ inbox-config=s inbox-version=i objstore=s manifest=s - project-list|projectslist=s post-update-hook=s@ + remote-manifest=s project-list|projectslist=s post-update-hook=s@ prune|p keep-going|k exit-code dry-run|n jobs|j=i no-torsocks torsocks=s epoch=s)) or die $help; if ($opt->{help}) { print $help; exit }; |