Bug 3150: (follow-up) Make subs to get host/related parts for notices
[koha-ffzg.git] / errors / 500.pl
index df8940a..26dab6f 100755 (executable)
@@ -38,7 +38,7 @@ $template->param (
     errno => 500,
 );
 my $status = '500 Internal Server Error';
-if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) {
+if ( C4::Context->is_internal_PSGI_request() ) {
     $status = '200 OK';
 }
 output_with_http_headers $query, $cookie, $template->output, 'html', $status;