diff options
Diffstat (limited to 't/clone-coderepo.psgi')
-rw-r--r-- | t/clone-coderepo.psgi | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/clone-coderepo.psgi b/t/clone-coderepo.psgi new file mode 100644 index 00000000..77072174 --- /dev/null +++ b/t/clone-coderepo.psgi @@ -0,0 +1,21 @@ +#!perl -w +# Copyright (C) all contributors <meta@public-inbox.org> +# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> +# for clone-coderepo.t +use v5.12; +use Plack::Builder; +use PublicInbox::WwwStatic; +use PublicInbox::WWW; +my $www = PublicInbox::WWW->new; +my $static = PublicInbox::WwwStatic->new(docroot => $ENV{TEST_DOCROOT}); +builder { + enable 'Head'; + sub { + my ($env) = @_; + if ($env->{PATH_INFO} eq '/manifest.js.gz') { + my $res = $static->call($env); + return $res if $res->[0] != 404; + } + $www->call($env); + }; +} |