use Plack::Response;
use constant STATIC => qw(
- data/assets
- data/webdot
- docs
- extensions/[^/]+/web
- graphs
- images
- js
- skins
+ data/assets/
+ data/webdot/
+ docs/
+ extensions/[^/]+/web/
+ graphs/
+ images/
+ js/
+ skins/
+ robots\.txt
);
my $app = builder {
my $static_paths
= join( '|', sort { length $b <=> length $a || $a cmp $b } STATIC );
enable 'Static',
- path => qr{^/($static_paths)/},
+ path => qr{^/(?:$static_paths)},
root => Bugzilla::Constants::bz_locations->{cgi_path};
my $shutdown_app
my $app = shift;
return sub {
my $env = shift;
+ warn "$env->{PATH_INFO} / $env->{SCRIPT_NAME}\n";
$env->{PATH_INFO} = '/index.cgi' if $env->{PATH_INFO} eq '/';
return $app->($env);
};