]> iEval git - gruntmaster-page.git/blobdiff - app.psgi
Check for /ct/... before /pb/...
[gruntmaster-page.git] / app.psgi
index 856d82c20baec055ec268114cab49614efaac15e..8d1d1ec9fa39bea51aaa2d79ff309c34fb641f75 100644 (file)
--- a/app.psgi
+++ b/app.psgi
@@ -12,7 +12,7 @@ use Digest::SHA qw/sha256/;
 use Log::Log4perl;
 
 use constant ACCESSLOG_FORMAT => '%{X-Forwarded-For}i|%h %u "%r" %>s %b "%{Referer}i" "%{User-agent}i"';
-use constant CONTENT_SECURITY_POLICY => q,default-src 'none'; script-src 'self' www.google-analytics.com; style-src 'self'; img-src 'self'; connect-src 'self',;
+use constant CONTENT_SECURITY_POLICY => q,default-src 'none'; script-src 'self' www.google-analytics.com; style-src 'self'; img-src 'self' www.google-analytics.com; connect-src 'self',;
 
 $Apache2::AuthzCaps::rootdir = $Apache2::Authen::Passphrase::rootdir;
 my $word = qr,(\w+),a;
@@ -70,8 +70,8 @@ sub mangle_request {
                my ($number, $word) = (qr,(\d+),a, qr,(\w+),a);
                for ($env->{PATH_INFO}) {
                        $env->{'gruntmaster.page'}    = $1 if s,/page/$number$,/,;
-                       $env->{'gruntmaster.problem'} = $1 if s,^/pb/$word/,/,;
                        $env->{'gruntmaster.contest'} = $1 if s,^/ct/$word/,/,;
+                       $env->{'gruntmaster.problem'} = $1 if s,^/pb/$word/,/,;
                        $env->{'gruntmaster.user'}    = $1 if s,^/us/$word/,/,;
                        $env->{'gruntmaster.page'}  //= -1 if m,^/log/$,;
                }
This page took 0.024308 seconds and 4 git commands to generate.