Condition Coverage

lib/PAGI/Middleware/CORS.pm
Criterion Covered Total %
condition 18 23 78.2


and 3 conditions

line !l l&&!r l&&r condition
74 4 2 1 $self->{'credentials'} and grep {$_ eq "*";} @{$$self{"origins"};}
97 2 0 1 $scope->{'method'} eq "OPTIONS" and $origin
103 0 1 1 $origin and $self->_is_origin_allowed($origin)

or 2 conditions

line l !l condition
67 6 1 $config->{'origins'} // ["*"]
68 1 6 $config->{'methods'} // ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
69 1 6 $config->{'headers'} // ["Content-Type", "Authorization", "X-Requested-With"]
70 0 7 $config->{'expose_headers'} // []
71 4 3 $config->{'credentials'} // 0
72 0 7 $config->{'max_age'} // 86400
182 3 0 $scope->{'headers'} // []