From: Dylan William Hardison Date: Sun, 26 Feb 2017 18:02:21 +0000 (+0000) Subject: Bug 1342784 - Serve robots.txt under plack mode X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d82c1388597f65878c1296f6f9cc91bb3c0b2da;p=thirdparty%2Fbugzilla.git Bug 1342784 - Serve robots.txt under plack mode --- diff --git a/app.psgi b/app.psgi index 5a83a41e4d..b05e62bdc6 100644 --- a/app.psgi +++ b/app.psgi @@ -38,21 +38,22 @@ use Plack::App::WrapCGI; 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 @@ -96,6 +97,7 @@ my $app = builder { 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); };