diff --git a/Koha/Middleware/CSRF.pm b/Koha/Middleware/CSRF.pm index a41da53054..811c212386 100644 --- a/Koha/Middleware/CSRF.pm +++ b/Koha/Middleware/CSRF.pm @@ -44,7 +44,7 @@ sub call { my $request_method = $req->method // q{}; my $uri = $req->uri // q{}; my $referer = $req->referer // q{No referer}; - my $request_path = $req->path // q{}; + my $request_path = $req->path // q{}; my %path_exceptions = ( '/ilsdi.pl' => 1, @@ -53,8 +53,8 @@ sub call { #NOTE: Ignore ErrorDocument requests for CSRF if ( $env->{'psgix.errordocument.SCRIPT_NAME'} ) { return $self->app->($env); - } - elsif ( $path_exceptions{$request_path} ){ + } elsif ( $path_exceptions{$request_path} ) { + #NOTE: Ignore path exceptions for CSRF return $self->app->($env); }