]> iEval git - gruntmaster-page.git/blobdiff - app.psgi
Merge branch 'master' into newmc
[gruntmaster-page.git] / app.psgi
index be72e9b18b9bd2fa4dd7ea7317d41d84a44e035c..837dd60ab51e100408d84934eb6d7fd80a4a724c 100644 (file)
--- a/app.psgi
+++ b/app.psgi
@@ -1,6 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 use v5.14;
-no if $] >= 5.017011, warnings => 'experimental::smartmatch';
+use warnings;
 
 use Gruntmaster::Data;
 use Plack::App::Gruntmaster;
@@ -8,19 +8,16 @@ use Plack::Builder;
 use Plack::Util;
 use Log::Log4perl;
 
-use constant AUTH_TIMEOUT => 5 * 60;
-use constant ACCESSLOG_FORMAT => '%{X-Forwarded-For}i %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"';
-
 sub CONTENT_SECURITY_POLICY () {
        my $csp = <<CSP;
 default-src 'none'
 connect-src 'self'
 form-action 'self'
 frame-ancestors 'none'
-img-src 'self' https://static.mindcoding.ro https://www.google-analytics.com/collect
+img-src 'self' https://static.mindcoding.ro
 referrer origin-when-cross-origin
-script-src https://static.mindcoding.ro/static/js.js https://www.google-analytics.com/analytics.js
-style-src https://static.mindcoding.ro/static/css/
+script-src 'self'
+style-src 'self'
 CSP
        chomp $csp;
        $csp =~ s/\n/; /gr;
@@ -51,12 +48,10 @@ sub add_headers {
 }
 
 Log::Log4perl->init_once('log.conf');
-my $access_logger = Log::Log4perl->get_logger('access');
 $ENV{DBIC_NULLABLE_KEY_NOWARN} = 1;
 
 builder {
        enable_if { $_[0]->{PATH_INFO} eq '/ok' } sub { sub{ [200, [], []] }};
-       enable 'AccessLog', format => ACCESSLOG_FORMAT, logger => sub { $access_logger->info(@_) };
        enable 'ContentLength';
        enable \&add_headers;
        enable 'Static', path => qr,^/static/,;
This page took 0.024871 seconds and 4 git commands to generate.