Fix secureToken with PSGI servers

This commit is contained in:
Christophe Maudoux 2019-09-28 19:45:07 +02:00
parent 200546b2e4
commit abf27ad7ac

View File

@ -106,7 +106,7 @@ sub run {
# Remove token
eval 'use Apache2::Filter' unless ( $INC{"Apache2/Filter.pm"} );
if ( $INC{"Apache2/Filter.pm"} ) {
if ( $INC{"Apache2/Filter.pm"} and defined $r->{env}->{'psgi.r'} ) {
$r->{env}->{'psgi.r'}->add_output_filter(
sub {
my $f = shift;