fixed "Page 1 of 0" in job log
[gruntmaster-page.git] / app.psgi
index 3a6be219ec8fe3f4a5a53a714247e9a8dbdcfa22..20c8cb56f57a73f3c17f44ce03535e6aff9267bb 100644 (file)
--- a/app.psgi
+++ b/app.psgi
@@ -14,7 +14,7 @@ default-src 'none'
 connect-src 'self'
 form-action 'self'
 frame-ancestors 'none'
-img-src 'self'
+img-src 'self' https://static.mindcoding.ro
 referrer origin-when-cross-origin
 script-src 'self'
 style-src 'self'
@@ -23,13 +23,10 @@ CSP
        $csp =~ s/\n/; /gr;
 }
 
-my $dbinit;
-
 sub add_database {
        my $app = $_[0];
        sub {
-               Gruntmaster::Data::init $ENV{GRUNTMASTER_DSN} // 'dbi:Pg:' unless $dbinit;
-               $dbinit = 1;
+               dbinit $ENV{GRUNTMASTER_DSN} // 'dbi:Pg:' unless db;
                $app->(@_)
        }
 }
This page took 0.009544 seconds and 4 git commands to generate.