]> Sergey Matveev's repositories - public-inbox.git/blobdiff - examples/public-inbox.psgi
git: allow cloning from the URL root, too
[public-inbox.git] / examples / public-inbox.psgi
index a90a2bc3ae7544ebedcc5eb04d64b52750989231..11e2a6e73a51115db0442600bd96650804cdc176 100644 (file)
@@ -47,7 +47,9 @@ builder {
        sub {
                my ($env) = @_;
                # share public-inbox.git code!
-               if ($src && $env->{PATH_INFO} =~ m!\A/public-inbox\.git/(.*)!) {
+               if ($src && $env->{PATH_INFO} =~
+                               m!\A/(?:public-inbox(?:\.git)?/)?
+                               ($PublicInbox::GitHTTPBackend::ANY)\z!xo) {
                        PublicInbox::GitHTTPBackend::serve($env, $src, $1);
                } else {
                        $www->call($env);