Condition Coverage

blib/lib/Mojolicious/Plugin/OpenAPI/Cors.pm
Criterion Covered Total %
condition 17 32 53.1


and 3 conditions

line !l l&&!r l&&r condition
71 2 0 1 $method eq "OPTIONS" and $c->match->endpoint->to->{'openapi.cors_preflighted'}
94 0 0 2 $ct and $PREFLIGHTED_CONTENT_TYPES{$ct}
108 0 0 0 $ct and $SIMPLE_CONTENT_TYPES{$ct}
116 0 1 3 not ref $errors and $errors =~ m[^/([\w-]+)]u
155 3 0 1 $defaults->{'action'} and $defaults->{'action'} eq "openapi_plugin_cors_exchange"

or 2 conditions

line l !l condition
7 0 48 $ENV{'MOJO_OPENAPI_DEBUG'} || 0
57 2 0 $c->stash('openapi_cors_allowed_origins') || []
58 2 0 $c->req->headers->origin // ""
75 4 4 $self->_is_simple_request($c) || $self->_is_preflighted_request($c) || 'real'
93 2 0 $req_h->content_type || ''
107 0 0 lc $req_h->content_type || ''
135 1 2 $req_h->header("Access-Control-Request-Headers") // ""

or 3 conditions

line l !l&&r !l&&!r condition
65 6 5 0 shift() || $c->stash('openapi_cors_default_exchange_callback')