X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=app.psgi;h=20c8cb56f57a73f3c17f44ce03535e6aff9267bb;hb=refs%2Fheads%2Fnewmc;hp=3a6be219ec8fe3f4a5a53a714247e9a8dbdcfa22;hpb=1f64ef28e31c592b91d5d75850229e01e7f89b84;p=gruntmaster-page.git diff --git a/app.psgi b/app.psgi index 3a6be21..20c8cb5 100644 --- 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->(@_) } }